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

pixi run codegen is broken on main #1238

Closed
SouthEndMusic opened this issue Mar 12, 2024 · 3 comments · Fixed by #1239
Closed

pixi run codegen is broken on main #1238

SouthEndMusic opened this issue Mar 12, 2024 · 3 comments · Fixed by #1239
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@SouthEndMusic
Copy link
Collaborator

Probably since the merger of the Add API, pixi run codegen is broken on main. Specifically it fails on gen_python.jl.

@SouthEndMusic SouthEndMusic added the bug Indicates an unexpected problem or unintended behavior label Mar 12, 2024
@github-project-automation github-project-automation bot moved this to To do in Ribasim Mar 12, 2024
@Hofer-Julian
Copy link
Contributor

This is the error message:

nu ❯ pixi run codegen
Pixi task (default): julia --eval='using Pkg; Registry.update()'
    Updating registry at `C:\Users\hofer_jn\.julia\registries\General.toml`

Pixi task (default): julia --project --eval='using Pkg; Pkg.instantiate()'
┌ Warning: The project dependencies or compat requirements have changed since the manifest was last resolved.
│ It is recommended to `Pkg.resolve()` or consider `Pkg.update()` if necessary.
└ @ Pkg.API C:\checkouts\github.com\Deltares\Ribasim\utils\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\
stdlib\v1.10\Pkg\src\API.jl:1800
Precompiling project...
  1 dependency successfully precompiled in 70 seconds. 253 already precompiled.

Pixi task (default): julia --project utils/gen_python.jl && ruff format python/ribasim/ribasim/schemas.py
ERROR: LoadError: TemplateError: failed to render: following error occurred during rendering:
MethodError(lstrip, (nothing,), 0x0000000000007be6)
Stacktrace:
 [1] (::Template)(; init::Dict{String, Vector{NamedTuple{(:name, :fields)}}})
   @ OteraEngine C:\Users\hofer_jn\.julia\packages\OteraEngine\oWbAQ\src\template.jl:121
 [2] (::var"#5#6")(io::IOStream)
   @ Main C:\checkouts\github.com\Deltares\Ribasim\utils\gen_python.jl:56
 [3] open(::var"#5#6", ::String, ::Vararg{String}; kwargs::@Kwargs{})
   @ Base .\io.jl:396
 [4] open(::Function, ::String, ::String)
   @ Base .\io.jl:393
 [5] top-level scope
   @ C:\checkouts\github.com\Deltares\Ribasim\utils\gen_python.jl:54
in expression starting at C:\checkouts\github.com\Deltares\Ribasim\utils\gen_python.jl:54

caused by: MethodError: no method matching lstrip(::Nothing)

Closest candidates are:
  lstrip(::Any, ::InlineStrings.String1)
   @ InlineStrings C:\Users\hofer_jn\.julia\packages\InlineStrings\rlLZO\src\InlineStrings.jl:481
  lstrip(::Any, ::InlineStrings.InlineString)
   @ InlineStrings C:\Users\hofer_jn\.julia\packages\InlineStrings\rlLZO\src\InlineStrings.jl:482
  lstrip(::Any, ::AbstractString)
   @ Base strings\util.jl:363
  ...

Stacktrace:
 [1] (::Template)(; init::Dict{String, Vector{NamedTuple{(:name, :fields)}}})
   @ OteraEngine C:\Users\hofer_jn\.julia\packages\OteraEngine\oWbAQ\src\template.jl:119
 [2] (::var"#5#6")(io::IOStream)
   @ Main C:\checkouts\github.com\Deltares\Ribasim\utils\gen_python.jl:56
 [3] open(::var"#5#6", ::String, ::Vararg{String}; kwargs::@Kwargs{})
   @ Base .\io.jl:396
 [4] open(::Function, ::String, ::String)
   @ Base .\io.jl:393
 [5] top-level scope
   @ C:\checkouts\github.com\Deltares\Ribasim\utils\gen_python.jl:54

@Hofer-Julian
Copy link
Contributor

Probably since the merger of the Add API

Not the add API, but the update to [email protected] is to blame

@SouthEndMusic
Copy link
Collaborator Author

Not the add API, but the update to [email protected] is to blame

Oops, the add API excuse already fails me ^^

Hofer-Julian added a commit that referenced this issue Mar 13, 2024
Fixes #1238

Also add CI jobs to catch similar problems earlier
visr added a commit that referenced this issue Mar 13, 2024
Fixes #1238

Also add CI jobs to catch similar problems earlier

---------

Co-authored-by: Martijn Visser <[email protected]>
@github-project-automation github-project-automation bot moved this from To do to ✅ Done in Ribasim Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants