comonicon / Comonicon.jl

Your best CLI generator in JuliaLang
https://comonicon.org
MIT License
282 stars 25 forks source link

Support weakdeps #252

Closed qiaojunfeng closed 1 year ago

qiaojunfeng commented 1 year ago

Hi, thanks for sharing the package!

Julia 1.9 introduces package extension, it seems Comonicon does not support this yet?

I just tried to come up with a quick hack, and it seems working fine in my case. Would be great if someone could have a look at this PR (maybe use this as a hint), and properly support this Julia feature in Comonicon. Thanks!

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage is 75.00% of modified lines.

Files Changed Coverage
src/builder/sysimg.jl 75.00%

:loudspeaker: Thoughts on this report? Let us know!.

Roger-luo commented 1 year ago

Ah right, thanks!

The building procedure uses a hack to create a build env based on your test and project env. Can you add a test project test to check if this works in the test suite? You can add a weakdeps in this example project https://github.com/comonicon/Comonicon.jl/tree/main/example/FakePkg

and you can modify the tests in that package.

qiaojunfeng commented 1 year ago

Thanks! Changed a bit the Project.toml of FakePkg to test the PR, I think we don't need to add other test files since without this PR the FakePkg.comonicon_install() would fail in the current tests of FakePkg/test/runtests.jl.

qiaojunfeng commented 1 year ago

Ok, pushed another commit, this should fix the Julia 1.6 tests

qiaojunfeng commented 1 year ago

Ok pushed a fix for Julia 1.6 again, could you restart the CI? Thanks!

qiaojunfeng commented 1 year ago

I think the code is fine now, but it seems the coverage of example wasn't generated so the coverage tests didn't pass

[ Info: CoverageTools.process_file: Detecting coverage for src/builder/sysimg.jl
┌ Info: CoverageTools.process_cov: Coverage file(s) for src/builder/sysimg.jl do not exist.
└ Assuming file has no coverage.

from the Run julia-actions/julia-processcoverage@v1 step of https://github.com/comonicon/Comonicon.jl/actions/runs/6111989250/job/16591892397

Roger-luo commented 1 year ago

Thanks fine it's not much, thanks!