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

use weakdeps wherever possible #121

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Conversation

aplavin
Copy link
Member

@aplavin aplavin commented Jan 4, 2024

No behavior change on any Julia version, just transform some deps into weakdeps on 1.9+.

@jw3126
Copy link
Member

jw3126 commented Jan 5, 2024

Mhh what is the benefit of making stdlibs into extensions?
I wonder if this creates friction when you do something like cd Accessors; ]activate .; include("test/runtests.jl")

@aplavin
Copy link
Member Author

aplavin commented Jan 5, 2024

Mhh what is the benefit of making stdlibs into extensions?

It's often done for foundational packages, so that loading times of any dependents and scripts are lower when these deps aren't needed. For large enduser focused packages this doesn't make any noticeable difference, but Accessors is potentially in the dependency tree of many projects.
Also see JuliaObjects/ConstructionBase.jl#81.

cd Accessors; ]activate .; include("test/runtests.jl")

Well, this doesn't work as-is anyway: it requires test dependencies from test/Project.toml, not just regular dependencies. So no extra friction: proper test env activation is needed anyway.

@jw3126
Copy link
Member

jw3126 commented Jan 5, 2024

Well, this doesn't work as-is anyway: it requires test dependencies from test/Project.toml, not just regular dependencies. So no extra friction: proper test env activation is needed anyway.

Ok that is a good argument 😄 What is your workflow for developing Accessors.jl? I do cd Accessors; ]activate .; include("test/runtests.jl") and have these test deps in my julia1.10 env anyway. At least for packages with not so many test deps as Accessors.jl has these days...

@aplavin
Copy link
Member Author

aplavin commented Jan 5, 2024

What is your workflow for developing Accessors.jl?

Just run ]test for testing, typically with most of the include lines in runtests.jl commented out. It's quite fast in Julia versions from recent years.
For my own packages I often use TestItems.jl with vscode.

I do cd Accessors; ]activate .; include("test/runtests.jl")

Did you try TestEnv.jl? Great to activate the actual test env with everything properly setup.

and have these test deps in my julia1.10 env anyway.

Oh, I only have packages like Revise, BenchmarkTools, and Pluto in my global env, nothing test-related :)

@jw3126
Copy link
Member

jw3126 commented Jan 6, 2024

Ok thanks, we can merge this!

@aplavin aplavin merged commit 5855946 into JuliaObjects:master Jan 7, 2024
8 checks passed
@aplavin aplavin deleted the weakdeps branch January 7, 2024 03:45
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