Skip to content

improve and relax the validation of explicit dependency names #3687

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

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Aug 25, 2021

motivation: follow up work to relaxing the requirement to set an explicit name on dependency, this relaxes the requirement that such name (if/when set) must match the manifest's name attribute, which we want to deprecate over time

changes:

  • change the validation flow to ignore the name set in the manifest, instead manage an in-memory list of names used for target based pacakge lookup which suffices
  • remove a few tests that are no longer needed given the relaxed requirment
  • fix a couple of tests that were always wrong but previous validation did not catch

motivation: follow up work to relaxing the requirement to set an explicit name on dependency, this relaxes the requirement that such name (if/when set) must match the manifest's name attribute, which we want to deprecate over time

changes:
* change the validation flow to ignore the name set in the manifest, instead manage an in-memory list of names used for target based pacakge lookup which suffices
* remove a few tests that are no longer needed given the relaxed requirment
* fix a couple of tests that were always wrong but previous validation did not catch
@tomerd
Copy link
Contributor Author

tomerd commented Aug 25, 2021

@swift-ci please smoke test

1 similar comment
@tomerd
Copy link
Contributor Author

tomerd commented Aug 25, 2021

@swift-ci please smoke test

@tomerd
Copy link
Contributor Author

tomerd commented Aug 25, 2021

<unknown>:0: error: module file '/home/buildnode/jenkins/workspace/swift-package-manager-Linux-smoke-test/branch-main/build/buildbot_incremental/xctest-linux-x86_64/module-cache/190V4ZLSW7H29/SwiftShims-3849312O4BV1I.pcm' is out of date and needs to be rebuilt: signature mismatch
09:54:06 <unknown>:0: note: imported by module 'SwiftOverlayShims' in '/home/buildnode/jenkins/workspace/swift-package-manager-Linux-smoke-test/branch-main/build/buildbot_incremental/xctest-linux-x86_64/module-cache/190V4ZLSW7H29/SwiftOverlayShims-3849312O4BV1I.pcm'
09:54:06 <unknown>:0: error: missing required module 'SwiftOverlayShims'
09:54:06 ninja: build stopped: subcommand failed.

@tomerd
Copy link
Contributor Author

tomerd commented Aug 25, 2021

@swift-ci please smoke test linux

@rauhul
Copy link
Member

rauhul commented Aug 26, 2021

Just wondering, is the goal to use the last path component of the package's url as the package name everywhere?

@tomerd
Copy link
Contributor Author

tomerd commented Aug 26, 2021

@rauhul the goal is to make the name attribute in the manifest have no functional consequences, or iow make sure it is used for display only. this us a multi step process, and this PR brings us one step closer

with SE-0292 we are transitioning to a reality where packages have unique identities, now these are derived from the url, but in the future they will be derived from a service

@tomerd
Copy link
Contributor Author

tomerd commented Aug 27, 2021

@swift-ci please smoke test linux

@tomerd
Copy link
Contributor Author

tomerd commented Aug 27, 2021

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants