Skip to content

Remove access to old size macros #2654

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

Closed

Conversation

ncik-roberts
Copy link
Contributor

Stop allowing use of the *size* family of macros. User code should instead use Allocated_*size*. This helps us be more confident that users will be notified if importing code that interprets a block's allocated size as its scannable size.

There are two exceptions:

  • User code can explicitly request the old naming of macros by defining a magic macro. This makes some user code much easier to update. (It's encouraged to use the new names, as this will also force people to think about new code they import in the future.)
  • The compiler distribution itself uses the *size* family of macros. This avoids some renaming churn in the compiler which could introduce the possibility of merge conflicts. A counterargument is: well, we should be confident that the compiler code has been vetted in the same way. (My preference is to rely on testing here.) I'm open to rethinking this, but my starting point is that it's better to avoid the merge conflicts.

Once #2653 is merged and user code is updated, we can merge this.

@ncik-roberts ncik-roberts force-pushed the nroberts-rename-size-macros1 branch from dbfd978 to 2c94209 Compare June 5, 2024 12:30
@ncik-roberts ncik-roberts deleted the nroberts-rename-size-macros branch June 5, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants