feat: add a Cargo feature for mgf_dev
-specific functionality #541
No reviewers
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev-feature"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
as discussed in #534 (comment)
AstNode::commutatively_isomorphic_to
dev
-specificAfter using it in #536, I'm not super duper convinced by the usefulness of having a feature… it forces us to recursively gate quite some things with it (including
use
statements, so that they're not marked as unnecessary). Do we really gain something with this? Isn't the compiler good enough at getting rid of code that's not used in a given binary, especially with the LTO optimization?I agree it can be annoying – for me it's the fact that rust-analyzer blends out the feature-gated code and doesn't show diagnostics for it (although there is a solution).
One solution to the need for granular imports could be to put everything dev-specific into a separate module, and gate that under the feature. The commutative isomorphism code is mostly self-contained after all.
Of course. It'll still compile the dev-only methods just to throw them away afterwards, which is a bit of a shame, but the resulting binary should be as lean as ever.
So overall I'm not too opposed to reverting this PR
+ turning on LTO in Cargo.toml(EDIT: nvm we have it turned on already)