-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refine test specific dependencies #52477
base: master
Are you sure you want to change the base?
Conversation
I ran into a bug affecting Julia 1.9.4 and older where non registered packages being depended on by both the Packages and it's test suite. This bug has been fixed for 1.10.x independently but i might still have to rewrite the test suite from the alternative approach pseudo project approach to the target approach. I hope these changes to the documentation reflect the current lack of clarity surrounding the usability of the new approach and give more insight in general. Some general editing was performed.
|
||
#### `target` based test specific dependencies | ||
|
||
Using this method of adding test-specific dependencies, the packages are added under an `[extras]` section and to a test target, | ||
e.g. to add `Markdown` and `Test` as test dependencies, add the following to the `Project.toml` file: | ||
!!! compat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect this compat
notice after the explanation of what the target
method does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is directly related to the decision what functionality to choose, i could see that compat block being useful before further explanations.
That said. I don't care.
Co-authored-by: Max Horn <[email protected]>
Co-authored-by: Jameson Nash <[email protected]>
Co-authored-by: Jameson Nash <[email protected]>
@@ -340,7 +340,7 @@ julia> write("test/runtests.jl", | |||
@test 1 == 1 | |||
"""); | |||
|
|||
(test) pkg> activate . | |||
(test) pkg> activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removed does not appear to be "white spaces".
I ran into a bug affecting Julia 1.9.4 and some older version where non registered packages being depended on by both the Packages and it's test suite result in a situation where there is no way to tweak the two involved
Project.toml
s to get the tests to run.This bug might have been fixed for 1.10.x independently in Pkg.jl JuliaLang/Pkg.jl#3410 . I might still have to rewrite the test suite from the alternative pseudo project approach to the traditional target approach. I hope these changes to the documentation reflect the current lack of clarity surrounding the practicality of the new approach. Some general editing was performed to add info and move info to the section where it fits best. Building on JuliaLang/Pkg.jl#3535
I was not bold enough to generally recommend against the "alternative pseudo project approach" as i have no idea how actively fixes to how
Project.toml
are handled are backported to still supported Julia versions.The Pkg.jl maintainers should also comment as this file is also shown in their documentation.