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] Serve target should not be generated for libraries #28

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

[BUG] Serve target should not be generated for libraries #28

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

Comments

@bcallaghan-et
Copy link
Collaborator

Describe the bug
When generating a library, the newly-added section of workspace.json includes a serve target. This target invokes dotnet run under the hood, which is not supported for library projects. The serve target should only be added to application projects.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Nx workspace
  2. Generate a new class library with npx nx generate @nx-dotnet/core:lib my-lib --template classlib --language C#
  3. Open workspace.json and find the section for my-lib.
  4. The architect key includes a serve target, which will always fail when run.

Expected behavior
A serve target should not be included for library projects. Only the build target should be scaffolded (plus a test target if a test template was specified).

Environment:

  • OS: Windows
  • Browser: N/A
  • Version: 0.2.0
  • Affected Packages: @nx-dotnet/core
@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 should be fixed in generate-project.ts. Bug was introduced when the logic was removed from the individual generators. Feel free to open a PR or I will get to it tomorrow sometime.

@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
Do not include serve target for libraries as they cannot be run directly.

Fixes #28
bcallaghan-et referenced this issue in Etogy/nx-dotnet Apr 27, 2021
Do not include serve target for libraries as they cannot be run directly.

Fixes #28
AgentEnder pushed a commit that referenced this issue Apr 27, 2021
Do not include serve target for libraries as they cannot be run directly.

Fixes #28

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

### Bug Fixes

* **core:** include serve target only for applications ([#30](#30)) ([9e4438e](9e4438e)), closes [#28](#28)
@github-actions
Copy link
Contributor

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

The release is available on:

Your semantic-release bot 📦🚀

@AgentEnder
Copy link
Member

@all-contributors add @bcallaghan-et for code

@allcontributors
Copy link
Contributor

@AgentEnder

I've put up a pull request to add @bcallaghan-et! 🎉

AgentEnder pushed a commit that referenced this issue Apr 27, 2021
Do not include serve target for libraries as they cannot be run directly.

Fixes #28

Co-authored-by: Ben Callaghan <bcallaghan@selectbankcard.com>
AgentEnder pushed a commit that referenced this issue Apr 27, 2021
# [0.3.0-dev.2](v0.3.0-dev.1...v0.3.0-dev.2) (2021-04-27)

### Bug Fixes

* **core:** include serve target only for applications ([#30](#30)) ([9e4438e](9e4438e)), closes [#28](#28)
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