#5520: drop redundant same-package +alias metas after auto-homing#5527
Merged
Conversation
Contributor
|
Contributor
Author
|
@yegor256, please take a look when you have a moment. All 25 checks are green. |
Member
|
@morphqdd conflicts here, please resolve them |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #5520.
Since #5425 the compiler auto-homes a bare reference to an object in the same package, so a hand-written
+alias <pkg>.<name>whose<pkg>equals the file's own+packageis dead weight. This removes all of them.For every
.eofile that has a+package Pmeta, the+alias P.<name>lines are deleted, and every cross-package alias is left untouched. For examplestring/at.eoloses+alias string.sliceand+alias string.sprintf(both same-package), whiletuple/reduced.eoloses+alias tuple.listand+alias tuple.reducedibut keeps+alias string.sprintf. Root-package files likestring.eokeep their+alias string.sprintfbecause their package is notstring.100 aliases removed across 62 files, pure deletion, no other changes:
string 31, tuple 35, io 17, sm 9, fs 8.
Verification:
mvn -pl eo-runtime clean installreaches the Java compilation stage, which means register, parse, assemble, lint and transpile all pass with the aliases gone, so every bare reference still resolves via auto-homing (the lint stage would flag any unresolved reference).