You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust example plugin in https://www.nushell.sh/contributor-book/plugins.html
does not compile with later versions of Nushell. Following the instructions
on the page the Cargo.toml pins the crates to 0.84.0 or whatever your current
version of Nushell is. The sample Cargo.toml on the page pins the crates at
0.80.0. If you replace the Cargo.toml with the example, the project compiles.
The change occurred between 0.80.0 and 0.81.0 in the nu-protocol crate.
The lines in the file: './src/main.rs' from the plugins.md source for the above
web page are:
./src/main.rs:16,17
.input_type(Type::String).output_type(Type::Int)
The change occurred in this commit:
(I've elided some of the non-relevant details of the commit message)
commit df94052180f45685b2a04ba332da734aa8aa701f
Author: Dan Davison <dandavison7@gmail.com>
Date: Wed Nov 9 16:55:05 2022 -0500
Declare input and output types of commands (#6796)
...
* Make it possible to declare input and output types for commands
- Enforce them in tests
* Declare input and output types of commands
* Revert SyntaxShape::Table -> Type::Table change
Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
The source lines that changed are in the main nushell repository:
'./crates/nu-protocol/src/signature.rs' (around lines 443 or so)
Changing the lines of the example main.rs to:
.input_output_type(Type::String,Type::Int)
Allows the project to build.
Additionally, the sample Cargo.toml should be changed to pin both the
'nu-plugin' and 'nu-protocol' crates to at least 0.84.0.
A corresponding PR has also been submitted.
The text was updated successfully, but these errors were encountered:
The Rust example plugin in https://www.nushell.sh/contributor-book/plugins.html
does not compile with later versions of Nushell. Following the instructions
on the page the Cargo.toml pins the crates to 0.84.0 or whatever your current
version of Nushell is. The sample Cargo.toml on the page pins the crates at
0.80.0. If you replace the Cargo.toml with the example, the project compiles.
The change occurred between 0.80.0 and 0.81.0 in the nu-protocol crate.
The lines in the file: './src/main.rs' from the plugins.md source for the above
web page are:
./src/main.rs:16,17
The change occurred in this commit:
(I've elided some of the non-relevant details of the commit message)
The source lines that changed are in the main nushell repository:
'./crates/nu-protocol/src/signature.rs' (around lines 443 or so)
Changing the lines of the example main.rs to:
Allows the project to build.
Additionally, the sample Cargo.toml should be changed to pin both the
'nu-plugin' and 'nu-protocol' crates to at least 0.84.0.
A corresponding PR has also been submitted.
The text was updated successfully, but these errors were encountered: