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

Separate support derivation (and small related tweaks to the Makefile) #3172

Merged
merged 6 commits into from
Dec 27, 2023

Conversation

mattpolzin
Copy link
Collaborator

Description

I aimed to not make any drastic or unneeded changes with this PR. Hopefully others agree that the small Makefile changes are all net positive in any context even if they were motivated in this case by a Nix refactor.

I tried to tell the story with the commit messages, but to enumerate the changes briefly:

  1. Instead of each of the two Chez bootstrap stages reading the SCHEME env var separately, take advantage of the fact that this variable is known in stage 1 and carry it forward to stage 2 automatically.
  2. Export needed library paths at the top of bootstrap stage 2 instead of inlining the environment variables. This reduces repetition which is even more significant given that I added two additional variables (one of them, DYLD_LIBRARY_PATH, just for good measure).
  3. Retain test isolation while still supporting flexibility with what support library to use by introducing optional overrides with TEST_ prefixes for library paths.
  4. Refactor Makefile slightly to specify the path for support files as a variable and at the same time build the support library based on a target that refers to the file name as is idiomatic to avoid rebuilding the support library if it is already there.
  5. Tackle a TODO in the Nix configs to build the support library as its own derivation and then use that in the Idris 2 build process.

Should this change go in the CHANGELOG?

  • If this is a fix, user-facing change, a compiler change, or a new paper
    implementation, I have updated CHANGELOG.md (and potentially also
    CONTRIBUTORS.md).

…d at the same time support overriding default bootstrap library locations
…refactor to adopt more idiomatic Makefile pattern of only building targets if they need to be built. it also supports building the support lib ahead of time and not rebuilding it when building Idris 2.
bootstrap-stage1-chez.sh Outdated Show resolved Hide resolved
@mattpolzin
Copy link
Collaborator Author

I'll merge this and keep an eye out for subtle build related problems that might come up in Discord. If anyone wants to suggest changes post-merge I am still happy to discuss them here and then follow-up with another PR to address them.

@mattpolzin mattpolzin merged commit ac266b7 into idris-lang:main Dec 27, 2023
22 checks passed
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.

2 participants