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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junctions (linked folders) in the assets folder are only partially copied to the build output #19086

Open
2 of 15 tasks
LoaderB0T opened this issue Oct 15, 2020 · 4 comments
Open
2 of 15 tasks
Labels
area: devkit/build-angular devkit/build-angular:browser feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Milestone

Comments

@LoaderB0T
Copy link

馃悶 Bug report

Command

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Did not work with ng 8 and does not work with ng 10. Did not check with 9 or anything before 8.

Description

When creating a junction inside the src/assets folder to another folder somewhere in the filesystem, the compiled output only contains the files that are directly beneath the linked folder. Any sub-folders in this linked folder are ignored by the compiler.

馃敩 Minimal Reproduction

Tested on Windows 10:

  1. Create an empty angular app with ng new assetsBugApp,
  2. create a folder outside the application like "testAssets"
  3. Inside "testAssets" create a textfile "works.txt"
  4. Inside "testAssets" create a folder "myFolder"
  5. Inside "testAssets/myFolder" create a textfile "does not work.txt"
  6. Create a junction from "assetsBugApp/src/assets/test" to "testAssets" (eg mklink /J C:\tmp\assetsBugApp\src\assets\test C:\tmp\testAssets)
  7. Run ng build
  8. Look in the dist/assets folder. You will find the folder "test" containing "works.txt" but no "myFolder" and no "does not work.txt"

馃實 Your Environment


Angular CLI: 10.1.4
Node: 12.18.3
OS: win32 x64

Angular: 10.1.4
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.4
@angular-devkit/build-angular      0.1001.4
@angular-devkit/build-ng-packagr   0.1001.4
@angular-devkit/core               10.1.1
@angular-devkit/schematics         10.1.4
@angular/cdk                       10.2.3
@angular/language-service          10.1.1
@angular/material                  10.2.3
@schematics/angular                10.1.4
@schematics/update                 0.1001.4
ng-packagr                         10.1.2
rxjs                               6.6.3
typescript                         3.9.7

Anything else relevant?
Might be isolated to Windows environments.

Would be great to have this resolved, copying assets from A to B is less fun than linking them... :)

@alan-agius4 alan-agius4 added devkit/build-angular:browser freq1: low Only reported by a handful of users who observe it rarely type: bug/fix severity3: broken area: devkit/build-angular feature Issue that requests a new feature and removed devkit/build-angular:browser freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix labels Oct 15, 2020
@ngbot ngbot bot modified the milestone: Backlog Oct 15, 2020
@alan-agius4
Copy link
Collaborator

Had chat with @clydin and he mentioned that this is the expected behaviour.

We mentioned two action points.

  • For globs provide an option to follow symlinks such as the one provided by node-glob (https://github.com/isaacs/node-glob)
  • Short hand paths ex src/assets (non globs) should always follow symlinks

@LoaderB0T
Copy link
Author

Hi @alan-agius4, thanks for the fast reply.
I also found a workaround. Adding the linked path directly to the assets array in the angular json resolves the issue and the subfolder is found/copied. In my personal case this workaround is enough to resolve the issue, would still be great if it would be found in the first place 馃憤

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 2, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 2, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: devkit/build-angular devkit/build-angular:browser feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants