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

Add GPR externals and env. vars. to build hash computation #1428

Merged
merged 5 commits into from
Sep 4, 2023

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Aug 21, 2023

This turned out a bit uglier than anticipated because when hashing the environment being set by the crate, it may depend on the own crate dir (via $CRATE_DIR), which in turn depends now on the build hash being computed.

So we have to break the circularity and skip these substitutions when we are still computing the build hash.

@mosteo mosteo marked this pull request as ready for review August 25, 2023 09:49
-- Externals modified but not declared are presumably for the
-- benefit of another crate. It's unclear if these will affect
-- the crate doing the setting, so we err on the side of
-- caution and include them in the hashing. Maybe we could make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to include them.


-- Environment variables
-- TBD

-- Configuration variables
-- TBD

-- Dependencies recursive hash? Since a crate can use a dependency
-- config spec, it is possible in the worst case for a crate to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I think that's something I already do in my project.

@mosteo mosteo merged commit 846a21e into alire-project:master Sep 4, 2023
12 checks passed
@mosteo mosteo deleted the feat/hash-externals branch September 4, 2023 08:23
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.

None yet

2 participants