GeophysicalFlows.jl
GeophysicalFlows.jl copied to clipboard
Not shipping `examples` with Manifest.toml can create some confusion
This is example is broken for me too, although the error I get is different than @francispoulin:
~/Projects/GeophysicalFlows.jl/examples$ julia --project
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.2 (2020-09-23)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> include("barotropicqg_betadecay.jl")
ERROR: LoadError: MethodError: no method matching Problem(::CPU; nx=128, Lx=6.283185307179586, β=10.0, μ=0.0, dt=0.05, stepper="FilteredRK4")
Closest candidates are:
Problem(; nx, Lx, ny, Ly, dt, f0, β, eta, ν, nν, μ, stepper, calcFU, calcFq, stochastic, T, dev) at /Users/gregorywagner/.julia/packages/GeophysicalFlows/i9qG7/src/barotropicqg.jl:34
Stacktrace:
[1] top-level scope at /Users/gregorywagner/Projects/GeophysicalFlows.jl/examples/barotropicqg_betadecay.jl:45
[2] include(::String) at ./client.jl:457
[3] top-level scope at REPL[1]:1
in expression starting at /Users/gregorywagner/Projects/GeophysicalFlows.jl/examples/barotropicqg_betadecay.jl:45
julia>
Originally posted by @glwagner in https://github.com/FourierFlows/GeophysicalFlows.jl/issues/128#issuecomment-721869498
If users clone the git repo (like I have done), and then update the code, they can easily forget to update the Manifest.toml in examples. This leads to confusing errors like the one above.
The solution may actually be to provide a single Project.toml for the whole project (and a Mainfest.toml) without a separate one for examples.
Hm... But we don't wanna include, e.g., Plots.jl as a dependency of the package.