chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.76k stars 414 forks source link

`source` field required in `Mason.toml` for registration, misleading documentation #25063

Open lucaferranti opened 2 months ago

lucaferranti commented 2 months ago

According to masonTomlFileCheck in masonPublish here, the Mason.toml file need to have a source field in order to be registered, otherwise it fails (example 1, example 2 ).

There is no mention of this in the documentation about Manifest file and in the documentation on publishing packages it is only mentioned in the second bullet list (manual steps), letting understand that if one uses mason publish this will be taken care of automatically (which is not the case).

A few solutions:

and a few bonus points:

benharsh commented 2 months ago

Thanks for this report! We're planning on going over and updating mason documentation in the near-ish future, and we'll make sure to address this case.

lucaferranti commented 2 months ago

it is only mentioned in the second bullet list (manual steps), letting understand that if one uses mason publish this will be taken care of automatically (which is not the case).

Actually that mention refers to X.Y.Z.toml, so as far as I can tell source being required in the Mason.toml itself is not mentioned.

What was the idea behind that requirement? It can be a nice-to-have info, but I am not sure if it's strictly needed for anything. Does mason rely on it?

benharsh commented 1 month ago

What was the idea behind that requirement? It can be a nice-to-have info, but I am not sure if it's strictly needed for anything. Does mason rely on it?

I believe mason relies on the source field to know where the source code for the package is hosted when pulling dependencies.

lucaferranti commented 1 month ago

I believe mason relies on the source field to know where the source code for the package is hosted when pulling dependencies.

but that applies to the X.Y.Z.toml file in the registry, no? Indeed, I think mason would see a dependency Mason.toml only after having pulled the dependency