Skip to content

Conversation

shlevy
Copy link
Contributor

@shlevy shlevy commented Oct 20, 2025

No description provided.

Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

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

Hey @shlevy this looks like an interesting addition, I'm still missing a bit of the whole picture. Can you outline how one would use pre-built dependendencies in a practical setting?

Comment on lines 164 to 175
'' + ''
for p in "''${pkgsHostTarget[@]}"; do
if [ -e $p/envDep ]; then
cat $p/envDep >> $configFiles/ghc-environment
fi
${ lib.optionalString component.doExactConfig ''
if [ -d $p/exactDep ]; then
cat $p/exactDep/configure-flags >> $configFiles/configure-flags
cat $p/exactDep/cabal.config >> $configFiles/cabal.config
fi
''}
done
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did we move this down? Is this due to a quirk how we handle stuff and now with the pre-builts this would need to come later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment.

, useLLVM ? ghc.useLLVM or false
, smallAddressSpace ? false

, prebuilt-depends ? []
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add a comment here. As I'm a bit fuzzy on what exactly prebuilt-depends are, I'm not sure I can come up with a good comment yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a new Note [prebuilt dependencies], does that help?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is great! 🫰

@shlevy
Copy link
Contributor Author

shlevy commented Oct 20, 2025

@angerman added a new Note [prebuilt dependencies], does that help?

Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

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

This is an interesting change. I like it!

I wonder if we somehow can encode the hash of the compiler/rts combination (plus some metadata for error messages) in the produced package to ensure we only ever load proper packages, and can provide some sensible error message?

#
# For your build to succeed, your prebuilt-dependencies must meet the following:
#
# 1. They are built with the same compiler version and RTS way.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# 1. They are built with the same compiler version and RTS way.
# 1. ⚠️ They are built with the same compiler version and RTS way.

This is of the utmost importance, as anything else will fail. I think adding some extra visual notion here is probably a good idea?

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