Closed
Conversation
Member
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: bazel
josephperrott
approved these changes
Oct 10, 2024
Member
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
(forgot to choose approve)
Reviewed-for: bazel
AndrewKushnir
approved these changes
Oct 10, 2024
Adds the logic that will generate the `import` expression that will initializer HMR for a specific component.
ceff38e to
f1a5492
Compare
f1a5492 to
64b99bb
Compare
Adds the logic to the compiler that will output the HMR initializer code for each component, if enabled.
…-insensitive platforms We're using `path.relative` to compute a relative path between a `SourceFile` and the one of the `rootDirs`. The problem is that the `rootDirs` get passed through `getCanonicalFileName` which lowercases the path in some platforms, while `SourceFile.fileName` is always case-insensitive. This yields a path outside of the project which we were ignoring. This change passes the `SourceFile.fileName` before passing it through `path.relative` to ensure that we get a valid result.
64b99bb to
4f68307
Compare
Member
|
This PR was merged into the repository by commit fb44323. The changes were merged into the following branches: main |
devversion
pushed a commit
that referenced
this pull request
Oct 11, 2024
Adds the logic to the compiler that will output the HMR initializer code for each component, if enabled. PR Close #58150
devversion
pushed a commit
that referenced
this pull request
Oct 11, 2024
…-insensitive platforms (#58150) We're using `path.relative` to compute a relative path between a `SourceFile` and the one of the `rootDirs`. The problem is that the `rootDirs` get passed through `getCanonicalFileName` which lowercases the path in some platforms, while `SourceFile.fileName` is always case-insensitive. This yields a path outside of the project which we were ignoring. This change passes the `SourceFile.fileName` before passing it through `path.relative` to ensure that we get a valid result. PR Close #58150
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Includes a couple of commits that enable the compiler to output calls that will enable HMR for component classes, as well as fix for file paths in
setClassDebugInfo.refactor(compiler): add logic to generate the HMR initializer
Adds the logic that will generate the
importexpression that will initializer HMR for a specific component.refactor(compiler-cli): output HMR initializer code
Adds the logic to the compiler that will output the HMR initializer code for each component, if enabled.
fix(compiler-cli): incorrectly generating relative file paths on case-insensitive platforms
We're using
path.relativeto compute a relative path between aSourceFileand the one of therootDirs. The problem is that therootDirsget passed throughgetCanonicalFileNamewhich lowercases the path in some platforms, whileSourceFile.fileNameis always case-insensitive. This yields a path outside of the project which we were ignoring.This change passes the
SourceFile.fileNamebefore passing it throughpath.relativeto ensure that we get a valid result.