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

ng config breaks with schema validation after library is added to workspace #20246

Closed
2 of 15 tasks
silvioboehme opened this issue Mar 11, 2021 · 1 comment · Fixed by #20249
Closed
2 of 15 tasks

ng config breaks with schema validation after library is added to workspace #20246

silvioboehme opened this issue Mar 11, 2021 · 1 comment · Fixed by #20249
Labels
area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Milestone

Comments

@silvioboehme
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

This works fine in version 11.2.3 and below and breaks with 11.2.4.
It's directly linked to commit 5f8155d

Description

A clear and concise description of the problem...

🔬 Minimal Reproduction


ng new Demo1 --createApplication=false --newProjectRoot=apps --strict=true
cd Demo1
ng config newProjectRoot apps
ng g application app1 --routing=true --style=scss  --strict=true
ng config newProjectRoot libs1
ng g library mylib1
ng config newProjectRoot libs2

Schema validation failed with the following errors:
  Data path ".projects['mylib1'].architect['build'].builder" should NOT be valid.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].builder" should be equal to constant.
  Data path ".projects['mylib1'].architect['build'].configurations['production']" should have required property 'project'.
  Data path ".projects['mylib1'].architect['build']" should match exactly one schema in oneOf.

Because 5f8155d adds "project" key as required to "configuration" but ng g library don't add this key!
I don't know why this is required now, but i think it's a bug in 5f8155d


        "build": {
          "builder": "@angular-devkit/build-angular:ng-packagr",
          "options": {
            "tsConfig": "libs1/mylib1/tsconfig.lib.json",
            "project": "libs1/mylib1/ng-package.json"
          },
          "configurations": {
            "production": {
              "tsConfig": "libs1/mylib1/tsconfig.lib.prod.json"
                                            <----- missing "project" !!!!!
            }
          }
        },
@alan-agius4 alan-agius4 added area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression labels Mar 11, 2021
@ngbot ngbot bot modified the milestone: needsTriage Mar 11, 2021
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Mar 11, 2021
alan-agius4 added a commit that referenced this issue Mar 11, 2021
alan-agius4 added a commit that referenced this issue Mar 11, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: angular/cli freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants