control-toolbox / OptimalControl.jl

Solvers of optimal control problems
MIT License
28 stars 5 forks source link

Package extensions #179

Closed jbcaillau closed 4 days ago

jbcaillau commented 2 weeks ago

@ocots @PierreMartinon @joseph-gergaud should avoid using (and precompiling)

From 1.9, use rather than Requires.jl. See also this talk at JuliaCon 2023.

jbcaillau commented 2 weeks ago

@amontoison any comment on Package extensions vs. Requires.jl?

amontoison commented 2 weeks ago

You can't use compat entry with Requires.jl. It's why we got the issue with Symbolics.jl in ADNLPModels.jl

If you don't need to support the LTS version (1.6), don't rely on Requires.jl and just use packages extensions.

jbcaillau commented 2 weeks ago

Regarding precompilation time, see also https://github.com/control-toolbox/OptimalControl.jl/issues/182

jbcaillau commented 2 weeks ago

@ocots current state of this change?

PierreMartinon commented 1 week ago

A nice simple example here: https://github.com/pebeto/julia_extensions_example I'll get started on ctdirect/nlpmodelipopt

Also, force julia 1.10 whenever possible. Significant improvements in loading times https://julialang.org/blog/2023/12/julia-1.10-highlights/#package_load_time_improvements

ocots commented 1 week ago

In the toml I don't know what target is for. An idea?

PierreMartinon commented 1 week ago

Apparently it is used to set the test dependencies if you don't want a separate Project.toml in test/ (or more generally dependencies for a sub-directory)

https://stackoverflow.com/questions/73148553/what-is-the-purpose-of-extras-and-targets-in-a-julia-project-toml

amontoison commented 1 week ago

@ocots It was not possible to use a separate Project.toml in the test directory with older versions of Julia (≤ v1.1). Many of us keep [extras] and [targets] to be able to test our packages on Julia v1.0 before that Julia v1.6 has become the new LTS version. Since it still works nowadays, we don't update it unless necessary.

jbcaillau commented 1 week ago

@ocots It was not possible to use a separate Project.toml in the test directory with older versions of Julia (≤ v1.1). Many of us keep [extras] and [targets] to be able to test our packages on Julia v1.0 before that Julia v1.6 has become the new LTS version. Since it still works nowadays, we don't update it unless necessary.

Good old fashioned julia boys 🥲

ocots commented 4 days ago

This has been done.

Extensions for Plots, DifferentialEquations and NLPModelsIpopt.