Report an error for an aliased type include - #7557
#7557Open
bentsherman wants to merge 1 commit into
masternextflow-io/nextflow:masterfrom
fix-7437-alias-type-includenextflow-io/nextflow:fix-7437-alias-type-includeCopy head branch name to clipboard
Open
Report an error for an aliased type include#7557bentsherman wants to merge 1 commit intomasternextflow-io/nextflow:masterfrom fix-7437-alias-type-includenextflow-io/nextflow:fix-7437-alias-type-includeCopy head branch name to clipboard
bentsherman wants to merge 1 commit into
masternextflow-io/nextflow:masterfrom
fix-7437-alias-type-includenextflow-io/nextflow:fix-7437-alias-type-includeCopy head branch name to clipboard
Conversation
Aliases were silently ignored when including a record or enum. The included type was appended to the compiler imports under its own name, so the alias never resolved while the original name stayed in scope -- the opposite of how aliasing works for processes, workflows, and functions. The user saw a confusing "not defined" error at the use site instead of an error on the alias. Reject the alias where includes are declared, so it is reported on the include entry itself. Closes #7437 Signed-off-by: Ben Sherman <bentshermann@gmail.com>
✅ Deploy Preview for nextflow-docs canceled.
|
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.
Fix #7437
Aliases were silently ignored when including a record or enum type. The included type was appended to the compiler imports under its own name, so the alias never resolved while the original name stayed in scope.
This PR reports an error for included-type aliasing, since it is not needed. Aliasing was intended only to work around the fact that a process/workflow cannot be called more than once in the same workflow