Skip to content

Conversation

@PetarKirov
Copy link
Contributor

At the time of writing (Spin v3.1.2), the Os enum is defined as follows:

enum Os {
    Linux,
    Macos,
    Windows,
}

This commit adjust the SIP to match the implementation by renaming osx to macos. Note that the SIP later on uses macos as part of the URL in one of the examples.

Background

Our team is using the Nix to package (build from source and "install") a Spin plugin that we developed. In process we created a Nix function to generate the spin plugin manifest file by compiling the source code, archiving and hashing it and filling the rest of manifest fields, following the SIP006 spec. Specifically, we were mapping Nix kernel name to spin plugin package os like so:

{
  linux = "linux";
  darwin = "osx";
}.${hostPlatform.parsed.kernel.name};

Testing on macOS immediately highlighted the problem:

invalid manifest for plugin '' at /nix/store/ycqy6f0pqg8c7fm894hbgjg5cfss4sw3-trigger-oracle.json: unknown variant `osx`, expected one of `linux`, `macos`, `windows` at line 9 column 17

…n (`osx` -> `macos`)

At the time of writing (Spin v3.1.2), the `Os` enum is [defined][0] as follows:

```rs
enum Os {
    Linux,
    Macos,
    Windows,
}
```

This commit adjust the SIP to match the implementation by renaming `osx` to `macos`. Note that the SIP later on uses `macos` as part of the URL in one of the examples.

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113

Signed-off-by: Petar Kirov <[email protected]>
Copy link
Collaborator

@itowlson itowlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this!

@itowlson itowlson enabled auto-merge February 12, 2025 21:16
PetarKirov added a commit to blocksense-network/blocksense that referenced this pull request Feb 12, 2025
The [implementation][0] uses `macos`, not `osx`. Also SIP006 uses
`macos` in one of the example URLs. Additionally, the authoritative
`spin-plugin-manifest-schema-0.1.json` was [updated][1] as well.

PR to fix the typo upstream: spinframework/spin#3011

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113
[1]: spinframework/spin-plugins#10
@itowlson itowlson merged commit 0f8b7ad into spinframework:main Feb 12, 2025
17 checks passed
PetarKirov added a commit to blocksense-network/blocksense that referenced this pull request Feb 13, 2025
The [implementation][0] uses `macos`, not `osx`. Also SIP006 uses
`macos` in one of the example URLs. Additionally, the authoritative
`spin-plugin-manifest-schema-0.1.json` was [updated][1] as well.

PR to fix the typo upstream: spinframework/spin#3011

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113
[1]: spinframework/spin-plugins#10
github-merge-queue bot pushed a commit to blocksense-network/blocksense that referenced this pull request Feb 13, 2025
The [implementation][0] uses `macos`, not `osx`. Also SIP006 uses
`macos` in one of the example URLs. Additionally, the authoritative
`spin-plugin-manifest-schema-0.1.json` was [updated][1] as well.

PR to fix the typo upstream: spinframework/spin#3011

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113
[1]: spinframework/spin-plugins#10
github-merge-queue bot pushed a commit to blocksense-network/blocksense that referenced this pull request Feb 13, 2025
The [implementation][0] uses `macos`, not `osx`. Also SIP006 uses
`macos` in one of the example URLs. Additionally, the authoritative
`spin-plugin-manifest-schema-0.1.json` was [updated][1] as well.

PR to fix the typo upstream: spinframework/spin#3011

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113
[1]: spinframework/spin-plugins#10
galin-s pushed a commit to blocksense-network/blocksense that referenced this pull request Mar 5, 2025
The [implementation][0] uses `macos`, not `osx`. Also SIP006 uses
`macos` in one of the example URLs. Additionally, the authoritative
`spin-plugin-manifest-schema-0.1.json` was [updated][1] as well.

PR to fix the typo upstream: spinframework/spin#3011

[0]: https://github.com/fermyon/spin/blob/v3.1.2/crates/plugins/src/manifest.rs#L113
[1]: spinframework/spin-plugins#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants