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

Recursive dependency #3

Closed
chorny opened this issue Dec 8, 2019 · 12 comments
Closed

Recursive dependency #3

chorny opened this issue Dec 8, 2019 · 12 comments

Comments

@chorny
Copy link

chorny commented Dec 8, 2019

Recursive dependency detected:
    Bio::Variation::SNP (have: N/A; want: 1.007004)
 => CJFIELDS/Bio-Variation-1.7.4.tar.gz
 => Bio::DB::GenBank (have: N/A; requires: 0)
 => CJFIELDS/Bio-DB-NCBIHelper-1.7.6.tar.gz
 => Bio::SeqIO::entrezgene (have: N/A; requires: 0)
 => CJFIELDS/Bio-ASN1-EntrezGene-1.73.tar.gz
 => Bio::Cluster::SequenceFamily (have: N/A; requires: 0)
 => CJFIELDS/Bio-Cluster-1.7.3.tar.gz
 => Bio::Variation::SNP (have: N/A; requires: 0).
@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

See also bioperl/bioperl-live#331

@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

We'll have to trace through this and see specifically where we can break this dependency. If it's only for tests this could be set up for running in dev-only mode.

@carandraug
Copy link
Member

The dependency on Bio::DB::GenBank and Bio::DB::EMBL is for the bp_flanks program so it can be called with an accession number instead of a file.

@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

@carandraug ah, makes sense. Question is how to disentangle this; any recommendations?

@carandraug
Copy link
Member

One suggestion is to make the class to use an argument to bp_flanks. This makes it a separate dependency, it makes a dependency that the user must explicity name, and also enables bp_flanks to work with any class that implements a specific interface.

@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

@carandraug seems like a reasonable solution. I did notice that the script doesn't actually use Bio::Variation modules, it is primarily used for extracting flanking regions for any list of positions (the most obvious case being variants) from local or remote sequence records. Any reason it's in this dist beyond it involving variants?

@carandraug
Copy link
Member

The commit messages bioperl/bioperl-live@1f7b54a says:

Bio::Variation::* move namespace into its own distribution.

Also move the program bin_flanks which although not actually using the
Bio::Variation modules, it's to be used in the same context.

@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

@carandraug works for me (makes sense to do so, just wanted to make sure).

cjfields added a commit that referenced this issue Jan 6, 2020
  * Remove Bio::DB::EMBL and Bio::DB::NCBIHelper dependencies, which cause a circular dependency (see issue #3)
@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

Pushing out a new point release (1.7.5), will see if this addresses the problem.

@carandraug
Copy link
Member

The change in d3a1dcc is really not what I suggested. But if you want to go that way, you might was well not change the code and list those two modules as dependencies to ignore on dist.ini with AutoPrereqs.skips (see bioperl-live dist.ini for an example)

@carandraug
Copy link
Member

[...] you might was well not change the code [...]

Well, you would only need to change the use to a require within the right block.

@cjfields
Copy link
Member

cjfields commented Jan 6, 2020

Well, you would only need to change the use to a require within the right block.

The fix was a bit low-hanging fruit but using the BioPerl API, we could switch it to a simple eval "require $class" or similar.

There will be instances where installing this distribution directly will fail with the auto-generated t/00-compile.t tests, see: http://www.cpantesters.org/cpan/report/1dcbc584-209d-11ea-99fe-b031dbec7dbf. Not sure if ignoring within dist.ini fixes this?

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

3 participants