Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Start a compiler HOWTOs guide. #1634

wants to merge 5 commits into from

Conversation

lucteo
Copy link
Contributor

@lucteo lucteo commented Dec 20, 2024

No description provided.

@lucteo lucteo requested a review from dabrahams January 2, 2025 09:29
@lucteo lucteo changed the title Start a compiler troubleshooting guide. Start a compiler HOWTOs guide. Feb 4, 2025
- 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;
Copy link
Collaborator

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…

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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;
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

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

Successfully merging this pull request may close these issues.

2 participants