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

[BUG] Output directory does not follow the Nx pattern #27

Closed
bcallaghan-et opened this issue Apr 27, 2021 · 5 comments
Closed

[BUG] Output directory does not follow the Nx pattern #27

bcallaghan-et opened this issue Apr 27, 2021 · 5 comments
Labels
bug Something isn't working outdated

Comments

@bcallaghan-et
Copy link
Collaborator

Describe the bug
The output directory added to the csproj file after generating a new project does not follow the pattern used by official Nx plugins. The generator @nrwl/angular:application (for example) will specify an output path that is identical to the project root, other than a dist/ prefix.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Nx workspace
  2. Generate a new .NET application with npx nx generate @nx-dotnet/core:app my-app --template console --language C# --test-template none
  3. Open the generated file apps/my-app/MyApp.csproj
  4. The OutputPath element specifies a path of ../../dist/my-app, which is missing the apps part of the original file path.

Expected behavior
The OutputPath element should have been ../../dist/apps/my-app to match the pattern of other Nx generators.

Environment:

  • OS: Windows
  • Browser: N/A
  • Version: 0.2.0
  • Affected Packages: @nx-dotnet/core

Additional context
When the project directory contains additional folder nesting (such as when the --directory flag is specified), the OutputPath element contains the extra directories, but it still does not contain the apps portion of the file path. The output path given in workspace.json never includes extra directories and, as a result, is sometimes inconsistent with the csproj file.

If the output path follows the standard Nx pattern, then the outputs property of the workspace.json file becomes unnecessary, as the explicit and default values are the same. It is worth nothing though that @nrwl/angular will explicitly specify the output path, even when it matches the inferred default.

@bcallaghan-et bcallaghan-et added bug Something isn't working needs-triage This issue has yet to be looked over by a core team member labels Apr 27, 2021
@AgentEnder
Copy link
Member

This looks good, I just forgot the part of the path specifier. If you want to tackle this go for it, should just need to update the generate-project.ts util file. Be sure to update the test as well. PR's should target dev for this.

@AgentEnder AgentEnder removed the needs-triage This issue has yet to be looked over by a core team member label Apr 27, 2021
bcallaghan-et referenced this issue in Etogy/nx-dotnet Apr 27, 2021
Include the full project path to match the pattern established by official Nx generators.

Fixes #27
bcallaghan-et referenced this issue in Etogy/nx-dotnet Apr 27, 2021
Include the full project path to match the pattern established by official Nx generators.

Fixes #27
AgentEnder pushed a commit that referenced this issue Apr 27, 2021
Include the full project path to match the pattern established by official Nx generators. This enhances consistency + prevents errors from apps having the same name in separate directories building to the same output.

Fixes #27

Co-authored-by: Ben Callaghan <bcallaghan@selectbankcard.com>
github-actions bot pushed a commit that referenced this issue Apr 27, 2021
# [0.2.0-dev.8](v0.2.0-dev.7...v0.2.0-dev.8) (2021-04-27)

### Bug Fixes

* **core:** use full project path in output directory ([d9e5988](d9e5988)), closes [#27](#27)
github-actions bot pushed a commit that referenced this issue Apr 27, 2021
# [0.3.0-dev.1](v0.2.0...v0.3.0-dev.1) (2021-04-27)

### Bug Fixes

* **core:** misc ([7661829](7661829))
* **core:** output paths still use windows separator on linux / mac ([b729fed](b729fed))
* **core:** packages not published by last CI run ([d07b9f3](d07b9f3))
* **core:** use full project path in output directory ([d9e5988](d9e5988)), closes [#27](#27)
* **repo:** deployment errors ([0d92c44](0d92c44))

### Features

* **ci:** fix publish script ([4c6e91a](4c6e91a))
* **core:** fix CD ([9d5b787](9d5b787))
* **core:** fix deployments ([561f462](561f462))
* **core:** semantic-release ([799dc55](799dc55))
* **core:** tag nx-dotnet projects ([6442d94](6442d94))
* **core:** test sr deployment ([fbc5bbf](fbc5bbf))
* **repo:** enable semantic-release ([12c223b](12c223b))
* **repo:** semantic-release ([895eb22](895eb22))
* **repo:** update gh actions for semantic release ([ed933e9](ed933e9))
* **utils:** update jsdocs ([83bec44](83bec44))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.3.0-dev.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nx-dotnet nx-dotnet deleted a comment from github-actions bot Apr 27, 2021
AgentEnder pushed a commit that referenced this issue Apr 27, 2021
Include the full project path to match the pattern established by official Nx generators. This enhances consistency + prevents errors from apps having the same name in separate directories building to the same output.

Fixes #27

Co-authored-by: Ben Callaghan <bcallaghan@selectbankcard.com>
AgentEnder pushed a commit that referenced this issue Apr 27, 2021
* **core:** misc ([7661829](7661829))
* **core:** output paths still use windows separator on linux / mac ([b729fed](b729fed))
* **core:** packages not published by last CI run ([d07b9f3](d07b9f3))
* **core:** use full project path in output directory ([d9e5988](d9e5988)), closes [#27](#27)
* **repo:** deployment errors ([0d92c44](0d92c44))

* **ci:** fix publish script ([4c6e91a](4c6e91a))
* **core:** fix CD ([9d5b787](9d5b787))
* **core:** fix deployments ([561f462](561f462))
* **core:** semantic-release ([799dc55](799dc55))
* **core:** tag nx-dotnet projects ([6442d94](6442d94))
* **core:** test sr deployment ([fbc5bbf](fbc5bbf))
* **repo:** enable semantic-release ([12c223b](12c223b))
* **repo:** semantic-release ([895eb22](895eb22))
* **repo:** update gh actions for semantic release ([ed933e9](ed933e9))
* **utils:** update jsdocs ([83bec44](83bec44))
github-actions bot pushed a commit that referenced this issue Apr 27, 2021
## [0.2.1-dev.1](v0.2.0...v0.2.1-dev.1) (2021-04-27)

### Bug Fixes

* **core:** include serve target only for applications ([#30](#30)) ([d3a54ce](d3a54ce)), closes [#28](#28)
* **core:** output paths still use windows separator on linux / mac ([ed1c53a](ed1c53a))
* **core:** use full project path in output directory ([7748f9c](7748f9c)), closes [#27](#27)

### Features

* **repo:** enable semantic-release ([298c5af](298c5af))
github-actions bot pushed a commit that referenced this issue Apr 27, 2021
## [0.2.1](v0.2.0...v0.2.1) (2021-04-27)

### Bug Fixes

* **core:** include serve target only for applications ([#30](#30)) ([d3a54ce](d3a54ce)), closes [#28](#28)
* **core:** output paths still use windows separator on linux / mac ([ed1c53a](ed1c53a))
* **core:** use full project path in output directory ([7748f9c](7748f9c)), closes [#27](#27)

### Features

* **repo:** enable semantic-release ([298c5af](298c5af))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.2.1-dev.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated
Projects
None yet
Development

No branches or pull requests

2 participants