-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[iOS][swiftpm] Documentation updates #58084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chrfalch
wants to merge
6
commits into
spm/spm-modules-guard
Choose a base branch
from
spm/library-author-docs
base: spm/spm-modules-guard
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0d7aeb7
Document how a library's SPM Swift name is derived and overridden
chrfalch befcee7
Update packages/react-native/scripts/spm/__docs__/spm-scripts.md
chrfalch 23eae07
Update packages/react-native/scripts/spm/__docs__/spm-scripts.md
chrfalch 8648781
Update packages/react-native/scripts/spm/__docs__/spm-scripts.md
chrfalch 20b3ecf
Clarify the spm.modules one-app-target limit
chrfalch 5184c04
Format spm-scripts.md after applying review suggestions
chrfalch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change the logic so we always keep the scope? It feels easier to implement and to remember, no?
It also helps with clashes.
For example, both Expo and Firebase might be publishing a
@expo/commonand@firebase/commonpackage.IF we keep the scoping, we have
ExpoCommonandFirebaseCommon, while if we drop it, we havetwo
Commonpackages, with a clash.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done to try to always match the existing header files folder name - which seemed to fit better without the scope - meaning less changes for our devs. I also agree that we could just use the scoped name all over - but that might lead to a few more changes by library authors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhm... in that case, it's probably better to fail immediately and asks the user to add a
spm.name.I don't think we have any one that has
#include<Common/SomeHeader.h>. This should also simplify the implementation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or in general why are we trying to do something smart? I can see more cases where this heuristic will fail than cases where it will work.
For example:
react-native-xxxxprobably does not have#import<ReactNativeXXX/Header>.Perhaps we should not try to be smart and we should just ask library maintainers to specify that the spm.name has to be their
importprefix.WDYT?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great points. What about reading from podspec if it exists and use the
header_dirfield? Thenreact-native-svgwould default toRNSVG- which is correct? This will be a new change in a separate PR (since the naming stuff is not really changed in this iteration - we just documented and added collision handling (#58044).