Skip to content

[wrappers] Improve wrappers in multi-project env #1067

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

Merged
merged 2 commits into from
Jun 1, 2023
Merged

Conversation

mikeland73
Copy link
Contributor

Summary

This is a possible cause of #881 (comment)

bin wrappers belong to a specific project so we should not have a single global hash.

How was it tested?

devbox shell
called binaries, inspected wrappers
devbox add curl
called binaries, inspected wrappers

@mikeland73 mikeland73 requested review from savil and ipince May 31, 2023 00:07
@@ -95,10 +96,10 @@ func CreateWrappers(ctx context.Context, devbox devboxer) error {
}

type createWrapperArgs struct {
devboxer
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is this used?

Copy link
Collaborator

Choose a reason for hiding this comment

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

as in, I see you removed ProjectDir field and added devboxer field
I also see that you set these fields above.

But I don't see any callsites being updated that used to use createWrapperArgs.ProjectDir but now use createWrapperArgs.ProjectDir()

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahh, its cause it is passed into go-templates and in go-templates the .ProjectDir can be used for fields and methods?

I hate go-templates.

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 initially wanted to use it for ShellEnvHash function as well but that requires a context :(

@mikeland73 mikeland73 merged commit 6d7eb36 into main Jun 1, 2023
@mikeland73 mikeland73 deleted the landau/wrappers branch June 1, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants