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

Compilation problem #27

Closed
dpryan79 opened this issue Sep 27, 2022 · 5 comments
Closed

Compilation problem #27

dpryan79 opened this issue Sep 27, 2022 · 5 comments

Comments

@dpryan79
Copy link

During the most recent migration on Bioconda I ran into a variety of issues compiling rosella. I'm guessing there have been API changes in some of the crates it depends on. There are too many error to list them all, so here are the first 3:

2022-09-27T20:28:12.8761272Z 20:28:12 BIOCONDA INFO (OUT) error[E0308]: mismatched types
2022-09-27T20:28:12.8762037Z 20:28:12 BIOCONDA INFO (OUT)   --> src/estimation/alignment_properties.rs:93:26
2022-09-27T20:28:12.8762376Z 20:28:12 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:12.8762700Z 20:28:12 BIOCONDA INFO (OUT) 93 |             if !bam.read(&mut record).is_some() {
2022-09-27T20:28:12.8786100Z 20:28:12 BIOCONDA INFO (OUT)    |                     ---- ^^^^^^^^^^^ expected struct `rust_htslib::bam::record::Record`, found struct `rust_htslib::bam::Record`
2022-09-27T20:28:12.8786567Z 20:28:12 BIOCONDA INFO (OUT)    |                     |
2022-09-27T20:28:12.8786940Z 20:28:12 BIOCONDA INFO (OUT)    |                     arguments to this function are incorrect
2022-09-27T20:28:12.8787394Z 20:28:12 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:12.8787769Z 20:28:12 BIOCONDA INFO (OUT)    = note: expected mutable reference `&mut rust_htslib::bam::record::Record`
2022-09-27T20:28:12.8788216Z 20:28:12 BIOCONDA INFO (OUT)               found mutable reference `&mut rust_htslib::bam::Record`
2022-09-27T20:28:12.8788653Z 20:28:12 BIOCONDA INFO (OUT)    = note: perhaps two different versions of crate `rust_htslib` are being used?
2022-09-27T20:28:12.8789063Z 20:28:12 BIOCONDA INFO (OUT) note: associated function defined here
2022-09-27T20:28:12.8789663Z 20:28:12 BIOCONDA INFO (OUT)   --> /home/conda/.cargo/git/checkouts/coverm-041e4150c7da0371/0d514e2/src/bam_generator.rs:25:8
2022-09-27T20:28:12.8790034Z 20:28:12 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:12.8790758Z 20:28:12 BIOCONDA INFO (OUT) 25 |     fn read(&mut self, record: &mut bam::record::Record) -> Option<HtslibResult<()>>;
2022-09-27T20:28:12.8791143Z 20:28:12 BIOCONDA INFO (OUT)    |        ^^^^
2022-09-27T20:28:12.8791402Z 20:28:12 BIOCONDA INFO (OUT) 
2022-09-27T20:28:13.7401611Z 20:28:13 BIOCONDA INFO (OUT) error[E0308]: mismatched types
2022-09-27T20:28:13.7402364Z 20:28:13 BIOCONDA INFO (OUT)   --> src/estimation/bams/contig_coverage.rs:74:30
2022-09-27T20:28:13.7402698Z 20:28:13 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:13.7403017Z 20:28:13 BIOCONDA INFO (OUT) 74 |     while bam_generated.read(&mut record)
2022-09-27T20:28:13.7403795Z 20:28:13 BIOCONDA INFO (OUT)    |                         ---- ^^^^^^^^^^^ expected struct `rust_htslib::bam::record::Record`, found struct `rust_htslib::bam::Record`
2022-09-27T20:28:13.7404219Z 20:28:13 BIOCONDA INFO (OUT)    |                         |
2022-09-27T20:28:13.7404574Z 20:28:13 BIOCONDA INFO (OUT)    |                         arguments to this function are incorrect
2022-09-27T20:28:13.7404897Z 20:28:13 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:13.7405552Z 20:28:13 BIOCONDA INFO (OUT)    = note: expected mutable reference `&mut rust_htslib::bam::record::Record`
2022-09-27T20:28:13.7405984Z 20:28:13 BIOCONDA INFO (OUT)               found mutable reference `&mut rust_htslib::bam::Record`
2022-09-27T20:28:13.7406436Z 20:28:13 BIOCONDA INFO (OUT)    = note: perhaps two different versions of crate `rust_htslib` are being used?
2022-09-27T20:28:13.7406838Z 20:28:13 BIOCONDA INFO (OUT) note: associated function defined here
2022-09-27T20:28:13.7407424Z 20:28:13 BIOCONDA INFO (OUT)   --> /home/conda/.cargo/git/checkouts/coverm-041e4150c7da0371/0d514e2/src/bam_generator.rs:58:8
2022-09-27T20:28:13.7414254Z 20:28:13 BIOCONDA INFO (OUT)    |
2022-09-27T20:28:13.7423982Z 20:28:13 BIOCONDA INFO (OUT) 58 |     fn read(&mut self, record: &mut bam::record::Record) -> bool;
2022-09-27T20:28:13.7424356Z 20:28:13 BIOCONDA INFO (OUT)    |        ^^^^
2022-09-27T20:28:13.7424621Z 20:28:13 BIOCONDA INFO (OUT) 
2022-09-27T20:28:13.7676301Z 20:28:13 BIOCONDA INFO (OUT) error[E0599]: the method `clone` exists for enum `Result<ProgressStyle, TemplateError>`, but its trait bounds were not satisfied
2022-09-27T20:28:13.7677166Z 20:28:13 BIOCONDA INFO (OUT)    --> src/estimation/bams/index_bams.rs:18:23
2022-09-27T20:28:13.7677737Z 20:28:13 BIOCONDA INFO (OUT)     |
2022-09-27T20:28:13.7678049Z 20:28:13 BIOCONDA INFO (OUT) 18  |     pb1.set_style(sty.clone());
2022-09-27T20:28:13.7678515Z 20:28:13 BIOCONDA INFO (OUT)     |                       ^^^^^ method cannot be called on `Result<ProgressStyle, TemplateError>` due to unsatisfied trait bounds
2022-09-27T20:28:13.7678912Z 20:28:13 BIOCONDA INFO (OUT)     |
2022-09-27T20:28:13.7679511Z 20:28:13 BIOCONDA INFO (OUT)    ::: /home/conda/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.1/src/style.rs:590:1
2022-09-27T20:28:13.7679896Z 20:28:13 BIOCONDA INFO (OUT)     |
2022-09-27T20:28:13.7680204Z 20:28:13 BIOCONDA INFO (OUT) 590 | pub struct TemplateError {
2022-09-27T20:28:13.7680716Z 20:28:13 BIOCONDA INFO (OUT)     | ------------------------ doesn't satisfy `TemplateError: Clone`
2022-09-27T20:28:13.7752970Z 20:28:13 BIOCONDA INFO (OUT)     |
2022-09-27T20:28:13.7756163Z 20:28:13 BIOCONDA INFO (OUT)     = note: the following trait bounds were not satisfied:
2022-09-27T20:28:13.7756581Z 20:28:13 BIOCONDA INFO (OUT)             `TemplateError: Clone`
2022-09-27T20:28:13.7756996Z 20:28:13 BIOCONDA INFO (OUT)             which is required by `Result<ProgressStyle, TemplateError>: Clone`
2022-09-27T20:28:13.7757442Z 20:28:13 BIOCONDA INFO (OUT) note: the method `clone` exists on the type `ProgressStyle`
2022-09-27T20:28:13.7757963Z 20:28:13 BIOCONDA INFO (OUT) help: consider using `Result::expect` to unwrap the `ProgressStyle` value, panicking if the value is a `Result::Err`
2022-09-27T20:28:13.7758371Z 20:28:13 BIOCONDA INFO (OUT)     |
2022-09-27T20:28:13.7758704Z 20:28:13 BIOCONDA INFO (OUT) 18  |     pb1.set_style(sty.expect("REASON").clone());
2022-09-27T20:28:13.7759050Z 20:28:13 BIOCONDA INFO (OUT)     |                      +++++++++++++++++
@rhysnewell
Copy link
Owner

Hi Devon,

Thanks for pointing this out to me. I think I know the reason for this, I can revert the changes that caused this and you shouldn't need to do anything on your end. Sorry for the inconvenience!

Cheers,
Rhys

@rhysnewell
Copy link
Owner

Actually, this wasn't due to something I did. This is because indicatif updated their api as you suggested. I'll draft up a new version for you with some better dependency restriction

@dpryan79
Copy link
Author

Excellent, thanks @rhysnewell !

@rhysnewell
Copy link
Owner

New version is uploaded and merged, thanks for your patience :)

@dpryan79
Copy link
Author

Awesome, thanks!

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

2 participants