Created attachment 247447 [details] Makefile 'cargo build' builds https://github.com/nvarner/typst-lsp successfully, but it fails in the ports framework using rust-1.74.1: > ===> Moving crates to /usr/ports/lang/typst-lsp/work/typst-lsp-0.12.1/cargo-crates > ===> Patching for typst-lsp-0.12.1 > ===> typst-lsp-0.12.1 depends on package: rust>=1.74.0 - found > ===> typst-lsp-0.12.1 depends on package: pkgconf>=1.3.0_1 - found > ===> typst-lsp-0.12.1 depends on file: /usr/local/bin/ccache - found > ===> Configuring for typst-lsp-0.12.1 > ===> Additional optimization to port applied > ===> Cargo config: > [source.cargo] > directory = '/usr/ports/lang/typst-lsp/work/typst-lsp-0.12.1/cargo-crates' > [source.crates-io] > replace-with = 'cargo' > [patch.'https://github.com/typst/typst.git'] > typst-syntax = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-syntax' } > typst = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst' } > typst-ide = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-ide' } > typst-macros = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-macros' } > typst-pdf = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-pdf' } > typst-syntax = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-syntax' } > [patch.'https://github.com/astrale-sharp/typstfmt'] > typstfmt_lib = { path = '/usr/ports/lang/typst-lsp/work/typstfmt-0.2.7/lib' } > ===> Updating Cargo.lock > error: failed to parse manifest at `/usr/ports/lang/typst-lsp/work/typst-lsp-0.12.1/Cargo.toml`
For the record the full error message is: ===> Updating Cargo.lock error: failed to parse manifest at `/wrkdirprefix/usr/ports/lang/typst-lsp/work/typst-lsp-0.12.1/Cargo.toml` Caused by: could not load Cargo configuration Caused by: could not parse TOML configuration in `/wrkdirprefix/usr/ports/lang/typst-lsp/work/.cargo/config.toml` Caused by: TOML parse error at line 11, column 1 | 11 | typst-syntax = { path = '/wrkdirprefix/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-syntax' } | ^ duplicate key `typst-syntax` in table `patch.https://github.com/typst/typst.git` and we have [patch.'https://github.com/typst/typst.git'] typst-syntax = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-syntax' } typst-syntax = { path = '/usr/ports/lang/typst-lsp/work/typst-0.10.0/crates/typst-syntax' } because typst-syntax appears with 2 different versions in CARGO_CRATES: typst-syntax@git+https://github.com/typst/typst.git?tag=v0.7.0\#da8367e189b02918a8fe1a98fd3059fd11a82cd9 \ typst,typst-ide,typst-macros,typst-pdf,typst-syntax@git+https://github.com/typst/typst.git?tag=v0.10.0\#70ca0d257bb4ba927f63260e20443f244e0bb58c This is probably not that easy to fix.