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

Support cargo workspaces #172

Merged
merged 1 commit into from Nov 24, 2020
Merged

Conversation

gfx
Copy link
Member

@gfx gfx commented Nov 21, 2020

Resolve #171, as @pchickey suggested in #171 (comment)

Confirmed I can build and deploy https://github.com/fastly/ecp-workspace-example

Copy link
Member

@phamann phamann left a comment

Choose a reason for hiding this comment

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

👍 LGTM - other than question regarding addition of quiet flag.

}

// Read the contents of the Cargo.lock file from filename.
func (m *CargoMetadata) Read() error {
cmd := exec.Command("cargo", "metadata", "--format-version", "1")
cmd := exec.Command("cargo", "metadata", "--quiet", "--format-version", "1")
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for adding the --quiet flag here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It suppresses some warnings, esp. for workspaces, like:

$ cargo metadata --format-version 1 > /dev/null
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /Users/goro-fuji/ghq/github.com/gfx/ecp-hello/app/Cargo.toml
workspace: /Users/goro-fuji/ghq/github.com/gfx/ecp-ecp-hello/Cargo.toml

It doesn't affect the fastly cli but I feel it's better to suppress.

@phamann phamann merged commit cab7281 into fastly:master Nov 24, 2020
@phamann phamann changed the title rust: support cargo workspaces Support cargo workspaces Nov 24, 2020
@phamann phamann added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Nov 24, 2020
@gfx gfx deleted the gfx/support-workspaces branch November 25, 2020 00:05
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

Successfully merging this pull request may close these issues.

Build failure with Cargo workspaces
2 participants