Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust provider tries to open Cargo.toml in wrong folder #1095

Open
1 task done
prideout opened this issue Apr 30, 2024 · 0 comments
Open
1 task done

Rust provider tries to open Cargo.toml in wrong folder #1095

prideout opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@prideout
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have a cargo workspace and nixpacks plan . or nixpacks build . both say:

Error reading crates/apollo-core/src/Cargo.toml

In my workspace, there's no Cargo.toml in any src/. There's one at the workspace root and one in crate root. My workspace structure looks like:

.
├── Cargo.lock
├── Cargo.toml
├── crates
│   ├── apollo-core
│   │   ├── Cargo.toml
│   │   └── src
│   │       └── lib.rs
│   ├── rest-server
│   │   ├── Cargo.toml
│   │   └── src
│   │       └── main.rs
│   └── wasm-connectors
│       ├── Cargo.toml
│       └── src
│           └── lib.rs
├── nixpacks.toml
└── rustfmt.toml

To reproduce

Create a Rust workspace using a structure as described in the bug report and do nixpacks plan . This fails.

As an experiment I tried nixpacks plan ./crates/rest-server, which succeeds, but produces the wrong plan because cargo doesn't know it's inside a workspace. The actual build fails.

Expected behavior

No response

Environment

macOS. nixpacks 1.21.3

@prideout prideout added the bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant