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

allow activate take context&pkgspec #39

Open
wants to merge 1 commit into
base: release-1.7
Choose a base branch
from

Conversation

Roger-luo
Copy link

@Roger-luo Roger-luo commented Jan 5, 2022

I find this would solve my own use case related to #38 that creates a shared environment from a path with a little bit more code creating the PackageSpec and Context but I believe these two API in Pkg is quite stable. I'm not sure what is the proper way of doing this PR, but I only need 1.7+ support

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.60%. Comparing base (787fdb4) to head (341704b).
Report is 14 commits behind head on release-1.7.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.7      #39      +/-   ##
===============================================
+ Coverage        81.17%   81.60%   +0.43%     
===============================================
  Files                3        3              
  Lines               85       87       +2     
===============================================
+ Hits                69       71       +2     
  Misses              16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Roger-luo
Copy link
Author

bump @oxinabox any chance to review this?

@oxinabox
Copy link
Member

oxinabox commented May 17, 2022

I do not understand this solution.
I don't think it is great extending our public API with methods that take 2 things from the private API.
But i don't understand this code, or how it is used

@Roger-luo
Copy link
Author

I do not understand this solution.

so one can create a Context and PackageSpec to specify a location of the project test environment to activate

I don't think it is great extending our public API with methods that take 2 things from the private API.

What would be the proper solution tho? should we change the convention of activate to activate(path)?

@oxinabox
Copy link
Member

What would be the proper solution tho? should we change the convention of activate to activate(path)?

We could introduce a thing that checks if the path exists, if so activate it, else use the module name.
Or visa-versa.

Or we could introduce a new activate_path.

I don't actually know how the current activate(::AbstractString) works or what exactly it does.
I always use TestEnv.activate()

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.

3 participants