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

Refine test specific dependencies #52477

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

freemin7
Copy link
Contributor

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.tomls 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.

@vtjnash vtjnash added the docs This change adds or pertains to documentation label Feb 6, 2024
doc/src/tutorials/creating-packages.md Outdated Show resolved Hide resolved
doc/src/tutorials/creating-packages.md Outdated Show resolved Hide resolved
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.
doc/src/tutorials/creating-packages.md Outdated Show resolved Hide resolved

#### `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
Copy link
Contributor

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

Copy link
Contributor Author

@freemin7 freemin7 Feb 27, 2024

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.

ViralBShah and others added 3 commits February 23, 2024 22:59
Co-authored-by: Max Horn <max@quendi.de>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@@ -340,7 +340,7 @@ julia> write("test/runtests.jl",
@test 1 == 1
""");

(test) pkg> activate .
(test) pkg> activate
Copy link
Contributor

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants