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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Docs/Compiler/Troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Troubleshooting compiler build issues

## Some of my CI builds succeed, and some fail.

At this point, Hylo compiler uses both a build system based on CMake, and one based on `swift build`.
Investigate if just one of them fails, and take it from there.

## Updating an external library

Let's take the example of Swifty-LLVM, which is a Hylo repository for which we always get the latest version from `main`.
For this example, making a change to Swifty-LLVM should be picked up automatically, after the change is submitted to `main`.
lucteo marked this conversation as resolved.
Show resolved Hide resolved
But this doesn't always happen.

To properly update the external library, do the following:
- quit any IDEs (yes, please do that)
- delete the build folder (e.g., `.build`)
- delete `Package.resolved`
- run `swift package resolve`
lucteo marked this conversation as resolved.
Show resolved Hide resolved
- build with Swift build system (e.g., `swift build -c release`), and ensure everything builds
- build with the CMake system and ensure that everything builds
dabrahams marked this conversation as resolved.
Show resolved Hide resolved
- upload the changes to `Package.resolved`; this should contain the commit sha for the latest version of the library.

> **_NOTE:_**
> VS Code imediatelly re-generates the swift packages, so, depending on the order of operations, this may interfere with the actual resolving of the packages.
> This is why we recommend closing the IDE first.

> **_NOTE:_**
> This will most probably update other packages that swift will use.
> This is expected.
lucteo marked this conversation as resolved.
Show resolved Hide resolved
Loading