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] targetDefaults in nx.json doesn't work #848

Open
maxisam opened this issue Apr 15, 2024 · 0 comments
Open

[BUG] targetDefaults in nx.json doesn't work #848

maxisam opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working needs-triage This issue has yet to be looked over by a core team member

Comments

@maxisam
Copy link

maxisam commented Apr 15, 2024

Current Behavior

I am trying to use nx crystal in nx 18. I tried to add options in nx.json but it doesn't work. However, if I move the same options to project.json, it works fine. Not sure if this is a bug or I misunderstand how targetDefault works.

Expected Behavior

targetDefaults should work in nx.json as targets in project.json

Github Repo

https://github.com/Sam-Lin-MillersLab/nx-dotnet-test

Steps to Reproduce

see the commit message in the repo

Nx Report

Node   : 20.12.0
OS     : win32-x64
yarn   : 1.22.22

nx (global)    : 16.6.0
nx             : 18.2.4
@nx/js         : 18.2.4
@nx/workspace  : 18.2.4
@nx/devkit     : 18.2.4
@nrwl/tao      : 18.2.4
---------------------------------------
Registered Plugins:
@nx-dotnet/core
---------------------------------------
Community plugins:
@nx-dotnet/core : 2.2.0

nx.json

{
  "$schema": "./node_modules/nx/schemas/nx-schema.json",
  "defaultBase": "main",
  "targetDefaults": {
    "build": {
      "cache": true,
      "dependsOn": ["^build"]
    },
    "lint": {
      "cache": true,
      "options": {
        "fix": true,
        "fixWhitespace": true,
        "fixStyle": "warn",
        "fixAnalyzers": "warn",
        "report": "./.reports",
        "verbosity": "diagnostic"
      }
    }
  },
  "plugins": ["@nx-dotnet/core"]
}

Failure Logs

No response

Additional Information

Nx AI Assistant doesn't help in this case as well

@maxisam maxisam added bug Something isn't working needs-triage This issue has yet to be looked over by a core team member labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage This issue has yet to be looked over by a core team member
Projects
None yet
Development

No branches or pull requests

1 participant