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

targetDefaults in nx.json doesn't work #22849

Open
2 of 4 tasks
maxisam opened this issue Apr 16, 2024 · 0 comments
Open
2 of 4 tasks

targetDefaults in nx.json doesn't work #22849

maxisam opened this issue Apr 16, 2024 · 0 comments
Assignees
Labels
scope: core core nx functionality type: bug

Comments

@maxisam
Copy link

maxisam commented Apr 16, 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

Failure Logs

{
  "$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"]
}

Package Manager Version

1.22.17

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Original I thought this might be nx-dotnet's issue but it seems like options is handled by nx directly and pass it to runExecutor

@AgentEnder AgentEnder self-assigned this Apr 29, 2024
@AgentEnder AgentEnder added the scope: core core nx functionality label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: core core nx functionality type: bug
Projects
None yet
Development

No branches or pull requests

2 participants