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

Only call 3dslink if a runner is not configured #63

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

ian-h-chamberlain
Copy link
Member

Follow-up to #60 which I believe broke cargo test and cargo run when a custom runner is configured...

#49 would probably have caught this if we ran some tests in CI — I will see if it's not too hard to add some kind of dummy crate to test against for those cases (integration tests, examples etc.)

This should help catch dead code more easily, since completely pub fns
are never considered to be unused but pub(crate) fns may be.
Copy link
Member

@Meziu Meziu left a comment

Choose a reason for hiding this comment

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

LGTM, though I find all of the pub(crate) diffs a bit funny 😆.

@ian-h-chamberlain ian-h-chamberlain merged commit 30fef76 into master Jun 19, 2024
3 checks passed
@ian-h-chamberlain ian-h-chamberlain deleted the fix/dont-always-link branch June 19, 2024 14:14
@ian-h-chamberlain
Copy link
Member Author

LGTM, though I find all of the pub(crate) diffs a bit funny 😆.

Yeah, I couldn't think of a better way to try and catch more dead code (like the fn I deleted). See https://stackoverflow.com/a/51636336/14436105 and rust-lang/rust#74970, rust-lang/rust#120079

pub(crate) seemed easiest to make sure everything still compiled, but some of those could also be probably be made private. An alternative as mentioned in some of those issues would be to move lib.rs to a submodule of main instead, which but that feels a bit awkward and I'm not sure if it would really help that much anyway.

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.

2 participants