-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Start a compiler HOWTOs guide. #1634
base: main
Are you sure you want to change the base?
Conversation
Also update the text with more concrete steps.
- create a PR with the changes, and ensure it's merged. | ||
- In `hylo` repository: | ||
- in `TopLevelDefaults.cmake`, change the `GIT_TAG` value corresponding to `CMakeModules` repository to point to the SHA containing the change above; | ||
- run `swift package update XXX`, where `XXX` is the name of the package that needs to be updated (`Swift-LLVM` in our example); this will update `Package.resolved` file, with the SHA of the change that needs to be brought in; |
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.
…which might not work because otherwise you wouldn't need the next step…
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.
I'm not following. Why wouldn't this work?
The next step is just a verification step, as the user is asked to enter two SHAs manually, in two different places. Ultimately we want to ensure that there is consistency between swift build and CMake build.
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.
It might not work because the symbolic tree-ish used in Package.swift might not correspond to the SHA you've updated CMakeModules to point at.
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.
swift package update
is independent of CMake build system. CMakeModules is not affecting this command.
- In `hylo` repository: | ||
- in `TopLevelDefaults.cmake`, change the `GIT_TAG` value corresponding to `CMakeModules` repository to point to the SHA containing the change above; | ||
- run `swift package update XXX`, where `XXX` is the name of the package that needs to be updated (`Swift-LLVM` in our example); this will update `Package.resolved` file, with the SHA of the change that needs to be brought in; | ||
- double check that the SHA in `Package.resolved` matches the one that was written in the `CMakeModules` repository; |
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.
Maybe we should just tell people to replace the SHA in Package.resolved… or to write the SHA into Package.swift. IDK what's best.
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.
I'm not sure that would work. For example, Swify-LLVM might require some other libraries and may require other changes in Package.resolved
.
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.
OK then, write the SHA into Package.swift and then do swift package resolve?
No description provided.