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

Split into separate crates #84

Closed
wants to merge 6 commits into from

Conversation

qryxip
Copy link
Member

@qryxip qryxip commented Oct 31, 2020

Ahead of #63.

This PR splits the 17 modules into separate small crates like @ngtkana's ac-adapter-rs.

It aims to make development of "bundlers" that works with ac-library-rs like this easier.

https://judge.yosupo.jp/submission/28576

Benefits

  1. We can easily, and precisely, list binlib (→ lib) dependencies by using cargo-udeps. We don't even need to parse source code of the bin by ourselves to find "dependencies".

Drawbacks

  1. With this plan, we would write "extern crate" usages as follwing. "Bundlers" would have to process this format. Also I'm not sure it is the best way to expand multiple crates.

    extern crate __acl_foo as foo; // refer to this!

    ↓ some tool (including expand.py)

    /*extern crate __acl_foo as foo;*/use crate::acl_foo as foo; // refer to this!
  2. This kind of crate is very incompatible with @kuretchi's cargo-simple-bundler. If we seriously follow the plan, we force cargo-simple-bundler to do:

    • Support 1. or something.
    • Consider lib_a::foolib_b (or lib_b::bar) dependencies.
    • Change the interface so that it can process multiple lib crates.
    • etc., etc.
  3. We would have to publish 18 crates.

    • We may publish documentaion on github.io instead of docs.rs.
  4. This change may interfere with manual copy-and-paste.

    • But we already provide expand.py. It would continue working, and it is easier to use than copy-and-pasting by hand.

@qryxip
Copy link
Member Author

qryxip commented Nov 4, 2020

I have found that it is possible to split the current ac-library-rs into separate crates automatically. Closing for now.

qryxip/ac-library-rs-parted

@qryxip qryxip closed this Nov 4, 2020
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

Successfully merging this pull request may close these issues.

1 participant