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

guppy for diem/diem is ran differently, should we allow peeps to customize how guppy is run for their repo? #25

Open
mimoo opened this issue Feb 11, 2021 · 6 comments

Comments

@mimoo
Copy link
Contributor

mimoo commented Feb 11, 2021

The repo diem/diem is really particular in the way we have to analyze its dependencies. It only supports x86_64-unknown-linux-gnu so we need to check dependencies that are pulled when building with this triplet, it also does two other things when we build: it ignores the diem-workspace-hack package and it uses the v2 cargo resolver instead of the default one.

So the question is: should we allow peeps to customize how guppy is run on a repo when adding one?

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

the V2 resolver is used for all the builds in docker files (via -Z flag, not via cargo x build)

https://github.com/diem/diem/blob/18b6a51aff5f44fca19f0743672e708ace423a7c/docker/build-common.sh#L14 + https://github.com/diem/diem/blob/18b6a51aff/cargo-flags

the cargo x build is only used in dev I believe?

the workspace-hack is disabled here: https://github.com/diem/diem/blob/18b6a51aff5f44fca19f0743672e708ace423a7c/docker/build-common.sh#L21

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

that's what cargo x generate-workspace-hack --mode disable does:

Screen Shot 2021-02-11 at 8 50 24 AM

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

OK, the quickest way to resolve this issue is to continue to call the command line cargo x generate-summaries when we deal with diem/diem, and use the normal way when we deal with another repo.

In the future it'd be good to allow people to customize how guppy is called (for example if in release they use specific features, or a specific target)

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

this would actually still be useful for custody (cc @jnaulty ) as they probably build for powerpc as target

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

Screen Shot 2021-02-11 at 10 33 48 AM

(from Rain's presentation)

@mimoo
Copy link
Contributor Author

mimoo commented Feb 11, 2021

OK so I will re-integrate cargo guppy so that we can run it on diem/diem for now, and at some point we'll have to implement a customizable guppy CargoSet run:

create a CargoSet for a given host/target triplet, a given set of initial features, a set of crates I want to ignore (for example testsuite, or workspace-hack), and obtain all the relevant dependencies from that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant