Skip to content

feat(#1450): add --skipBin to limit compilation of hybrid deps#1647

Draft
daylinmorgan wants to merge 8 commits into
nim-lang:masterfrom
daylinmorgan:feat-1450
Draft

feat(#1450): add --skipBin to limit compilation of hybrid deps#1647
daylinmorgan wants to merge 8 commits into
nim-lang:masterfrom
daylinmorgan:feat-1450

Conversation

@daylinmorgan

Copy link
Copy Markdown
Contributor

This implements a new flag --skipBin, so that we can run nimble build|setup|install without also compiling hybrid dependencies.

In the current implementation, subsequent runs don't attempt to compile the binary for example:
nimble setup --skipBin && nimble setup doesn't result in hybrid dep binaries being compiled.

I'm not sure if that is what we want, let me know if any invocation without --skipBin should result in compilation of the hybrid deps. In which case I think I need to adjust the heuristics in solveLockFileDeps.

Closes #1450

@daylinmorgan daylinmorgan marked this pull request as ready for review March 29, 2026 14:22
@jmgomez

jmgomez commented Mar 29, 2026

Copy link
Copy Markdown
Collaborator

In the current implementation, subsequent runs don't attempt to compile the binary for example:
nimble setup --skipBin && nimble setup doesn't result in hybrid dep binaries being compiled.

IMO when --skipBin is not present, it should check if the binary exists and if it isnt, build it.

Wether to approve this or not, it isnt my call. cc @Araq @arnetheduck

@daylinmorgan

Copy link
Copy Markdown
Contributor Author

IMO when --skipBin is not present, it should check if the binary exists and if it isnt, build it.

I agree, this make more sense, and is certainly how I would imagine users would expect it to work.
I've updated packageExists to ensure the binaries are present and if not it reinstalls the package, and thus builds the binaries as expected.

@daylinmorgan daylinmorgan force-pushed the feat-1450 branch 2 times, most recently from 8a8be35 to e7299ba Compare March 30, 2026 12:58
@daylinmorgan daylinmorgan force-pushed the feat-1450 branch 2 times, most recently from ac9381b to 1883245 Compare March 31, 2026 15:56
unrelated test failures were triggered by a missing nim to execute
nimscript to downgrade a removed package
Comment thread src/nimblepkg/vnext.nim Outdated
let binPath = pkgInfo.getOutputDir(bin)
if not fileExists(binPath):
return false
result = true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just return here

Comment thread tests/tskipbin.nim Outdated
cleanFiles nimblePathsFileName, nimbleConfigFileName
body

suite "--skipBin":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please dont use templates to expand the tests, its fine to extract repeated code but this doesnt follow the symmetry of the whole codebase. Try to be more meaningful in the suite name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought at least one template would be necessary to abstract the repeated step (checkSkip in this case) when using std/unittest since otherwise the check false isn't propagated to the test block level and then the test itself shows as [OK] even with failures.

@daylinmorgan daylinmorgan marked this pull request as draft April 8, 2026 20:32
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.

add an option for skipping compilation of hybrid packages

2 participants