build(bazel): some cleanup tasks#47632
Conversation
6140579 to
4c38e68
Compare
There was a problem hiding this comment.
This fixes a regression caused by 92a06f7#diff-077dd6145fe7c7d7e36918be05c1ccac4aa3393ff98f743feaa0730ea2d86b6aR7.
Basically, the realX properties are undefined when the doc is outside of packages/, e.g., a doc inside of /aio/content. projectRelativePath doesn't do any resolution so it's always defined, causing some files to get the pacakges/ prefix that shouldn't.
There was a problem hiding this comment.
Nice catch. Capturing this here for the future. Even though this is in the angular-api-package- there is aio/content files processed. These don't use the TS processor and therefore are not scoped to the /packages base path. Non TS files do not have the realFilePath property: https://github.com/angular/dgeni-packages/blob/9dfdd284c09776a48b5eae031441d410de556192/base/processors/read-files.js#L99-L100.
4c38e68 to
ac89362
Compare
There was a problem hiding this comment.
Because dgeni needs to be able to walk angular's node_modules tree to resolve typescript types, I had to add no-remote-exec because we're going over the RBE limit. Limit is 70,000 and this puts it at ~96000.
There was a problem hiding this comment.
In the components repo we are just doing this explicitly. Can we do this here too? https://github.com/angular/components/blob/main/src/BUILD.bazel#L34-L39
There was a problem hiding this comment.
I believe you should be able to fine-grain select dependencies which are relevant for the TS API doc generation-like we do in the components repo.
There was a problem hiding this comment.
Good call. Turns out I only needed
"@npm//rxjs",
"@npm//@types/node",
There was a problem hiding this comment.
I believe you should be able to fine-grain select dependencies which are relevant for the TS API doc generation-like we do in the components repo.
There was a problem hiding this comment.
Sorry, I feel like I keep asking on this symlinking stuff but I want to be sure we capture this in the relevant spots. Why do we need to follow symlinks for these files but not for the other generated files? Especially if we use copy_to_bin? Isn't everything a symlink in the runfiles directory?
This stuff can be captured in the commit messages too
There was a problem hiding this comment.
I'm not exactly sure why these assets were failing to load on Windows. @alan-agius4 pointed me to this fix and it seemed to just work.
I want to double check why it's not needed for the other folders, or at least what makes the cases different. I'll do that and I'll try to write a better comment.
There was a problem hiding this comment.
I looked into this a bit further.
The assets are layed out in the symlink tree the same way on all platforms: asset (source) files are symlinks, laid out in real folders.
Something different about the assets below these ones, stackblitz/generated, example-zips/generates etc. is that these are directory artifacts, so the folder itself is a symlink to the output tree but then all of the files are real.
For whatever reason, architect on Windows has issues following symlinks to files but not symlinked directories to real files. I checked to see whether this was related to the "serve" target using assets from the source tree rather than the copied-to-bin version, but it's the same result.
So this may just be an architect issue (fyi @alan-agius4 ), or just an issue with Windows symlinks behaving differently.
@devversion I'll improve the comment but are you okay with this workaround for now?
There was a problem hiding this comment.
Nice catch. Capturing this here for the future. Even though this is in the angular-api-package- there is aio/content files processed. These don't use the TS processor and therefore are not scoped to the /packages base path. Non TS files do not have the realFilePath property: https://github.com/angular/dgeni-packages/blob/9dfdd284c09776a48b5eae031441d410de556192/base/processors/read-files.js#L99-L100.
268ba4c to
668e6d1
Compare
5339d16 to
394709f
Compare
2f7362a to
d422210
Compare
f245ca9 to
feac689
Compare
It was out of date with the current legacy build
No longer needed after the migration
Windows Added "followSymlinks" blocks on the assets.
Add the hack to a central location so that it's easier to fix later.
rules_nodejs released a fix for the RUNFILES issue.
Fixes the 'Export has no declarations: unknown' warning and unresolved type warnings.
written Incorrectly prepended 'packages/' to docs that were under aio/content.
Caused by chromium debug logs in @angular/build-tooling.
Some earlier refactoring prevented the watchr script from running in the source tree. There was also a Windows issue where running architect didn't preserve symlinks causing the app to not be served.
feac689 to
be3e19c
Compare
|
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. |


@devversion @josephperrott @gregmagolan
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the new behavior?
Updated CLI sources version to match with
main, removed some unused package.json scripts.Does this PR introduce a breaking change?