fdncred / nu_plugin_json_path

A nushell plugin for parsing json that uses the json path specification.
MIT License
14 stars 1 forks source link

add a mention to the hardcoded relatives crate path #1

Closed amtoine closed 1 year ago

amtoine commented 1 year ago

hello there :wave: :yum:

this plugin is very cool :ok_hand: :muscle:

:exclamation: however, i have an error when trying to compile the source code as-is :thinking:

> cargo build --release
error: failed to get `nu-json` as a dependency of package `nu_plugin_json_path v0.0.3 (/home/amtoine/.local/share/git/store/github.com/fdncred/nu_plugin_json_path)`

Caused by:
  failed to load source for dependency `nu-json`

Caused by:
  Unable to update /home/amtoine/.local/share/git/store/github.com/fdncred/nushell/crates/nu-json

Caused by:
  failed to read `/home/amtoine/.local/share/git/store/github.com/fdncred/nushell/crates/nu-json/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

:wrench: to fix it as my repos are located in $env.GIT_REPOS_HOME/<host>/<owner>/<repo>, i had to run the following

>_ [nu-json nu-plugin nu-protocol]
))) | each {|crate|
)))     let local = ($env.GIT_REPOS_HOME | path join "github.com" "nushell" "nushell" "crates" $crate)
)))     cargo add $crate --path $local
))) }
      Adding nu-json (local) to dependencies.
             Features:
             + linked-hash-map
             + preserve_order
      Adding nu-plugin (local) to dependencies.
      Adding nu-protocol (local) to dependencies.
             Features:
             - plugin
             - serde_json

in the end, nothing bad at all, when the error is known it's straightforward to fix :wink:

that's just a proposition with the newcomers in mind :relieved:

fdncred commented 1 year ago

Thanks. I added your comments to the readme. I also removed nu-json because it isn't needed.

amtoine commented 1 year ago

amazing, that's perfect :ok_hand:

maxim-uvarov commented 1 year ago

Absolutely cool plugin! I was able to install with no customization on the latest Macos. Just fyi. 🙏🙏🙏