JuliaLang/PackageCompiler.jl

Better error message when uuid is not present in Project.toml

Offen

#1.033 geöffnet am 02.03.2025

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Julia (200 Forks)batch import
feature requestgood first issue

Repository-Metriken

Stars
 (1.538 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 19T 6h) (4 gemergte PRs in 30 T)

Beschreibung

A nitpick, and clearly an instance of my own stupidity, however: While working through the MWE on my own codebase, I hit:

julia> create_app("MyApp", "MyAppCompiled")
ERROR: expected package to have a `name` and `uuid`

For whatever reason, I thought these should be arguments to create_app, which is totally wrong. It turns out that during generation of my package, no uuid was placed in the Project.toml, leading to this error message. (I now can't remember how I created it-it appears PkgTemplates now always adds a uuid so it's unclear how I got into this situation in the first place.) Nonetheless, it seems that the message could be improved to:

julia> create_app("MyApp", "MyAppCompiled")
ERROR: MyApp.jl/Project.toml has no `uuid`; this is required.

Of course willing to submit a PR as this seems like a straightforward change.

Contributor Guide