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

Remove envbuilder dependency from devcontainer_test #115

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

aaronlehmann
Copy link
Collaborator

@aaronlehmann aaronlehmann commented Mar 27, 2024

devcontainer_test imports the top-level envbuilder package, which creates a transitive dependency on kaniko for external code that imports envbuilder/devcontainer. Duplicating envbuilder.MagicDir within the test allows us to remove this dependency.

devcontainer_test imports the top-level envbuilder package, which
creates a transitive dependency on kaniko for external code that imports
envbuilder/devcontainer. Moving the test file to the top level avoids
this dependency.
@aaronlehmann aaronlehmann requested a review from kylecarbs March 27, 2024 13:29
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

Since we only use envbuilder.MagicDir in this file, I'd prefer to copy/paste that var into the test file as a const.

I think it's less idiomatic to split the test from the package rather than duplicate some code.

@aaronlehmann aaronlehmann changed the title Move devcontainer_test.go to top level Remove envbuilder dependency from devcontainer_test Mar 27, 2024
@aaronlehmann aaronlehmann merged commit 6a88184 into coder:main Mar 27, 2024
1 check passed
@aaronlehmann aaronlehmann deleted the move-test branch March 27, 2024 15:31
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