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

adds support for re-exporting crate #79

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Conversation

colstrom
Copy link
Contributor

Heyo! Thanks for making veil, it's useful!

I'd like to request (and provide) a small change that makes it possible to use veil in a way that it doesn't currently support.

As it stands, the ::veil paths are anchored, which requires the depending crate to directly depend on veil. That's suitable for most cases (clearly, since it only works this way currently), but it also makes it so that importing it from a crate that re-exports it doesn't work. This in turn makes it difficult to provide a batteries-included sort of functionality in downstream crates.

This change removes the path anchors, and to the best of my knowledge should not break anything, except what I assume would be an unusual scenario where another module exists in the same scope that also happens to be named veil. This puts the responsibility on whoever does that to anchor the reference there, which seems like a fair trade.

The test suite still runs (and passes!), and I haven't done anything with the versioning, since while I'm pretty sure that this won't cause any issues, I'm still not quite clear on how that would intersect with versioning. 🤔

If you'd like me to change anything, just let me know and I'd be happy to do my best!

Thanks again, people like you making cool things is why we have so much great stuff in the Rust ecosystem. ❤️

@colstrom colstrom requested a review from a team as a code owner October 30, 2024 03:53
MaeIsBad
MaeIsBad previously approved these changes Oct 30, 2024
Copy link
Member

@MaeIsBad MaeIsBad left a comment

Choose a reason for hiding this comment

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

Seems fine, thanks 🙂

I'll wait for another dev to review before merging

CHANGELOG.md Outdated

### Changed

- Breaking: de-anchor veil inputs, to allow for reimporting.
Copy link
Member

Choose a reason for hiding this comment

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

veil imports?

cottinisimone
cottinisimone previously approved these changes Oct 30, 2024
Copy link
Member

@cottinisimone cottinisimone left a comment

Choose a reason for hiding this comment

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

It was cleaner to open a new PR for fixing clippy things but..
The rest LGTM

@MaeIsBad MaeIsBad dismissed stale reviews from cottinisimone and themself via c662710 October 30, 2024 10:01
@MaeIsBad
Copy link
Member

It was cleaner to open a new PR for fixing clippy things but..

yeah probably

MaeIsBad
MaeIsBad previously approved these changes Oct 30, 2024
@MaeIsBad MaeIsBad merged commit 942d21a into primait:master Oct 30, 2024
3 checks passed
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.

3 participants