this is my first post, I hope this is the correct list. I spotted an
edgecase in modcargo, the ports-module for rust projects:

Given a project that depends on typenum, the output between
modcargo-gen-crates and modcargo-gen-crates-licenses varies, on the
former, every dependency is detected correctly, on the later typenum is

        make modcargo-gen-crates | grep typenum
        make modcargo-gen-crates-licenses | grep typenum

I've noticed that typenum uses unusual-but-valid indent of two spaces in
its Cargo.toml, so the line with the license looks like
this: `  license = "MIT/Apache-2.0"`.

The target for modcargo-gen-crates-licenses uses a regex to parse the
toml file, specifically this line in

        -exec grep -H '^license' {} \; \

I think this needs to be `^\s*license`. Technically this can still cause
issues for license keys in different sections or keys like
`license-foo`, but would resolve the specific issue I ran into.

I didn't run into any other problems and I've successfully built a
package for my toy project that covers a fair number of edgecases. I
hope this helps to improve it further!


Reply via email to