-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
On .install, check a distro's /resources file paths are identical to those of the META6.json file's <resources> #576
Comments
Indeed you can already know if there is a file listed in META6.json that doesn't exist by running |
Nick, I respectfully disagree. The example I showed (Foo::Bar) is a distro I published last week (I didn't see it mentioned in the Raku Weekly). Clone it, cd to it, visually confirm the "resources" mismatch, and run
and I see nothing about a "resources" mismatch. |
Please re-read what I said and compare it to your repository:
In your repo the
Specifically it is expected that a user can have files anywhere in their repository (except Build.rakumod) and it doesn't matter as long as the META6.json has the necessary stuff listed. |
While I don't think it makes sense for such a test to be run for anyone other than module authors, I've gone ahead and wrote a basic cut and paste-able test that module authors can use to test their distribution before authoring changes: https://gist.github.com/ugexe/c32f3a8128237c30a291f9eefb03e520 Remember that this is indeed an authoring issue: the only person who can act on this information not being correct is the author of the distribution. Therefore ideally only the distribution author is running these checks, not users installing stuff via |
That's fine, thanks. But what about an alternative for authors? Consider this: The author is beavering away in his or her repo and wants to check things and runs:
Output:
|
This should be a fundamental check due to the close ties between Raku distributions and their 'META6.json' file. Unless those two "resources" file path lists match, it is impossible to download a '/resources' directory's file payload without foreknowledge of those paths.
But, with a match, the distribution author can easily provide the means to do so.
Currently, and apparently, such is not done since I have never seen such an error using 'zef install . --debug' with known mismatches.
Context
Among other things, current Raku documentation does not clearly point out how critical that a "resources" match is to downloading '/resources' from an installed distribution.
Expected Behavior
In a distribution repository directory with no listed 'resources' under '/resources' or in the 'META6.json file, no change to current bevavior is needed.
But for any other case, report any mismatch:
The "WARNING" should also appear without the '--debug' option.
Upon 'zef install Some::Module', throw an error and describe the mismatch. Also add a message that the user should file an issue with that distribution's author.
Actual Behavior:
No warning is given, even with the '--debug' option to 'zef'.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: