Guppy fails with unknown target
nasifimtiazohi opened this issue · 6 comments
Guppy fails on project solana with below message:
Error: Error while computing package graph: for package 'solana-merkle-tree 1.8.0 (path+file:///Users/nasifimtiaz/repos/solana/merkle-tree)': for dependency 'matches', parsing target 'bpfel-unknown-unknown' failed: unknown target triple: bpfel-unknown-unknown
The relevant Cargo.toml from the project: https://github.com/solana-labs/solana/blob/5085f10b4cfa03dbffa5cf7d7e103bcd31f0bdc6/merkle-tree/Cargo.toml#L16-L19
I believe the cfg-expr version needs to be updated. Feel free to do so and release new guppy versions (@bmwill may be able to as well), or I might get around to it in the next few weeks when I'm feeling a bit better.
@sunshowers Yeah it looks like we may have to do a little tweaking since by default it looks like cfg-expr only handles builtin targets. We're also not in a huge rush to fix this, I was just ensuring that Nasif documented some of the issues he ran into prior to the end of his internship.
Yeah -- part of the problem is that our target selection code just can't process a target that it doesn't know about. One potential solution is to shell out to rustc
and use targets from it, if available, but that's a bit more work.
It seems like target-lexicon
might be another option, although i'm not sure exactly what guppy expects out of the target information so that may not solve the problem.
That would run into the same problem (target-lexicon
also has to keep its targets up to date e.g. bytecodealliance/target-lexicon@fc20d68) -- and we use the evaluator in target-spec
so would have to write our own anyway.
(Also cfg-expr
actually uses target-lexicon
I believe)