facebook / dotslash

Simplified executable deployment
https://dotslash-cli.com
Apache License 2.0
535 stars 14 forks source link

Misplaced "format" entry not flagged as error #14

Closed adamh-oai closed 3 months ago

adamh-oai commented 4 months ago

I accidentally put the "format" config entry in the provider section, instead of the next level up inside "platforms". This was not detected as a config error, it just failed at runtime when the file wasn't unpacked.

bolinfest commented 3 months ago

By design, DotSlash ignores JSON fields that it does not know anything about so that an old DotSlash binary might still work with new, optional parameters in the JSON.

As noted on https://dotslash-cli.com/docs/dotslash-file/#format, "format" is not required:

At Meta, we have found compression to be a win, but if for some reason you prefer to fetch your executable as an uncompressed single file, you can omit the "format" field, but "path" is still required.

I'm not sure if there is anything we can do about this. In general, we expect the overwhelming majority DotSlash files to be generated via automation, which helps reduce the chance of this sort of error.

adamh-oai commented 3 months ago

That makes sense, thanks.