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

[BUGFIX] Ensure legacy path.parts matches existing semantics #1583

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

chancancode
Copy link
Contributor

The refactor in #1568 slightly changed the semantics of path.parts in that it didn't previously include this or the leading @. This commit restores the previous semantics.

The refactor in #1568 slightly changed the semantics of `path.parts`
in that it didn't previously include `this` or the leading `@`. This
commit restores the previous semantics.
@NullVoxPopuli NullVoxPopuli merged commit d051884 into main Mar 28, 2024
6 checks passed
@NullVoxPopuli NullVoxPopuli deleted the ast-bugfix branch March 28, 2024 20:42
@johanrd
Copy link

johanrd commented Jun 4, 2024

@chancancode FYI: After upgrading my app from ember-source 5.8 to 5.9 (i.e. glimmer-vm 0.87.1 to 0.92.0, my app builds just fine, but I get 17 357 of these messages upon build:

pnpm start (with emboider/webpack)

DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Template') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Template') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
DEPRECATION: The parts property on path nodes is deprecated, use head and tail instead
DEPRECATION: The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was 'Block') 
[... and 17000 more]

It is not obvious to me where they come from or what to do about them. Any pointers? thanks

@chancancode
Copy link
Contributor Author

chancancode commented Jun 4, 2024

@johanrd does it happen on a fresh app? what addons do you have installed? this would be something that touches the AST, so something with an AST plugin/transform that runs during the build. Unfortunately the deprecation infrastructure here is not very good, it's basically just a console.warn(). Potentially you could patch out the console.warn() to a throw and weed these out based on the stack traces

@johanrd
Copy link

johanrd commented Jun 12, 2024

@chancancode thanks fot the reply. Turns out this is tracked now over here embroider-build/embroider#1967

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.

3 participants