Skip to content

Deprecate defaultProject #12394

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

Closed

Conversation

filipesilva
Copy link
Contributor

More context in #11111 (comment)

Fix #11111

@@ -20,7 +20,7 @@ export interface WorkspaceSchema {
*/
newProjectRoot?: string;
/**
* The default project.
* (DEPRECATED) The default project.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that's better, thanks!

@filipesilva filipesilva force-pushed the deprecate-defaultproject branch from a9c8710 to f44ec58 Compare September 28, 2018 10:20
alan-agius4
alan-agius4 previously approved these changes Sep 28, 2018
@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Sep 28, 2018
@@ -6,7 +6,7 @@

- **version** (`integer`): File format version. This is currently `"1"`.

- **newProjectRoot** (`string`): Path where new projects will be created.
- **newProjectRoot** (`string`): (**DEPRECATED**) Path where new projects will be created.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong, shouldn't it be on the following option?

Copy link
Contributor Author

@filipesilva filipesilva Oct 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeez, that's what I get for amending commits in a rush. Didn't even notice. Fixed now.

@filipesilva filipesilva force-pushed the deprecate-defaultproject branch from 28feb78 to f227ba9 Compare October 1, 2018 18:52
alan-agius4
alan-agius4 previously approved these changes Oct 1, 2018
@@ -20,7 +20,8 @@ export interface WorkspaceSchema {
*/
newProjectRoot?: string;
/**
* The default project.
* @deprecated From 7.0.0
* The default project.*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you have an extra * at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed

@filipesilva filipesilva added state: blocked and removed target: major This PR is targeted for the next major release labels Oct 2, 2018
@alexeagle
Copy link
Contributor

Blocked because we will reopen a larger discussion of project layout for ng8

@ngbot
Copy link

ngbot bot commented Oct 31, 2018

Hi @filipesilva! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@filipesilva filipesilva added the needs: discussion On the agenda for team meeting to determine next steps label Jul 11, 2019
@filipesilva
Copy link
Contributor Author

We need to actually design what non-project scoped commands should do. Currently default project almost never applies, and when it does it might not be the right thing anyway.

@filipesilva filipesilva removed the needs: discussion On the agenda for team meeting to determine next steps label Jul 25, 2019
@SchnWalter
Copy link
Contributor

SchnWalter commented May 18, 2020

From what I can tell from #11111 (comment), this PR should be closed. Although there are still inconsistencies between various commands where the project name is sometimes passed using --projects and other times it's --name. I'll look into this in the upcoming weeks and if it's clear what the default flag should be, I'll create some PRs to streamline the options.

L.E. In this repository, the "simple" (component, module, etc) schematics are consistent, the inconsistency is in the more complex schematics, see:

File Path Property Name Default value
packages/_/devkit/package/schema.json name argv #0
packages/angular/pwa/pwa/schema.json name projectName
packages/schematics/angular/app-shell/schema.json clientProject projectName
packages/schematics/angular/application/schema.json name argv #0 + x-prompt
packages/schematics/angular/e2e/schema.json relatedAppName undefined
packages/schematics/angular/library/schema.json name argv #0 + x-prompt
packages/schematics/angular/ng-new/schema.json name argv #0 + x-prompt
packages/schematics/angular/universal/schema.json clientProject undefined
---------- --------------- --------------
packages/schematics/angular/class/schema.json project projectName
packages/schematics/angular/directive/schema.json project projectName
packages/schematics/angular/enum/schema.json project * Longer description, not really needed. projectName
packages/schematics/angular/guard/schema.json project projectName
packages/schematics/angular/interceptor/schema.json project projectName
packages/schematics/angular/interface/schema.json project projectName
packages/schematics/angular/module/schema.json project projectName
packages/schematics/angular/pipe/schema.json project projectName
packages/schematics/angular/service/schema.json project projectName
packages/schematics/angular/service-worker/schema.json project projectName
packages/schematics/angular/web-worker/schema.json project projectName

And there are also a few inconsistencies in the https://github.com/angular/angular repository:

File Path Property Name Default value
packages/bazel/src/schematics/ng-add/schema.json name argv #0
packages/bazel/src/schematics/ng-new/schema.json name argv #0
packages/elements/schematics/ng-add/schema.json project projectName
packages/localize/schematics/ng-add/schema.json name projectName
aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json project projectName

The https://github.com/angular/components repository has consistent names in the schematics:

File Path Property Name Default value
src/cdk/schematics/ng-add/schema.json project projectName
src/cdk/schematics/ng-generate/drag-drop/schema.json project projectName
src/material/schematics/ng-add/schema.json project projectName
src/material/schematics/ng-generate/address-form/schema.json project projectName
src/material/schematics/ng-generate/dashboard/schema.json project projectName
src/material/schematics/ng-generate/navigation/schema.json project projectName
src/material/schematics/ng-generate/table/schema.json project projectName
src/material/schematics/ng-generate/tree/schema.json project projectName

@dgp1130 dgp1130 mentioned this pull request Apr 29, 2021
1 task
@dgp1130
Copy link
Collaborator

dgp1130 commented Apr 29, 2021

Going through old PRs. After some discussion, we still think we should deprecate defaultProject, but this PR is fairly old and not usable in its current state anyways. Filed #20661 to follow up with a deprecation.

@dgp1130 dgp1130 closed this Apr 29, 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 May 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: not generate files to the defaultProject
6 participants