-
-
Notifications
You must be signed in to change notification settings - Fork 34
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] nx-flutter: inferred tasks aren't working #227
Comments
Thanks for using the plugin and for reporting this. Can you please share me the content of your .env file (if present at root) and your nx.json + project.json files please? |
Sure. there's no The {
"extends": "nx/presets/npm.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"plugins": [
{
"plugin": "@nxrocks/nx-flutter",
"options": {
"analyzeTargetName": "analyze",
"cleanTargetName": "clean",
"formatTargetName": "format",
"testTargetName": "test",
"doctorTargetName": "doctor",
"assembleTargetName": "assemble",
"attachTargetName": "attach",
"driveTargetName": "drive",
"genL10nTargetName": "gen-l10n",
"installTargetName": "install",
"runTargetName": "run",
"buildAarTargetName": "build-aar",
"buildApkTargetName": "build-apk",
"buildAppbundleTargetName": "build-appbundle",
"buildBundleTargetName": "build-bundle",
"buildIosTargetName": "build-ios",
"buildIosFrameworkTargetName": "build-ios-framework",
"buildIpaTargetName": "build-ipa"
}
}
],
"targetDefaults": {}
} And a {
"name": "apps/poc",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/poc/src",
"tags": []
} this is what was generated by the plugin, I just changed the name of the project to match the folder |
Hi, can you try changing the I'm not sure "apps/poc" is valid. What matters to find the files is the "sourceRoot". |
I've created a new project to test this out. Run this command from the route: npx nx g @nxrocks/nx-flutter:project and chose these options:
still getting 0 projects run when trying to run a target. I've also tried renaming the project just "poc" but that didn't help either. |
Thanks for your response. I will have a closer look this weekend and let you know. Stay tuned |
Sorry for the delay. This should be fixed now in the latest version of the If you've already generated your workspace, you can simply update the version of If the version of package, in the Either action should force the download of the right version of underlying Enjoy! |
Thanks @tinesoft yes I can confirm some of the tasks are now running. I did Is it expected for (is there a way to specify if I want to use FVM or not via environmental flag? it would be useful to disable FVM on CI) |
Thanks for the updates.
Right now, no. In the meantime, if you don't have |
Hi @tinesoft I'm sorry, there's still some target not working: npx nx run-many -t gen-l10n produces:
the same happen with, for example, the |
Inferred tasks depends on the type of project (template) your have generated, the target platforms you've chosen , etc... The related code can be found here
Some of the values, are read at runtime from the .metadata file that is present at the root of each flutter project. Can you show me the content of those files ? |
core/auth
and apps/poc
both of them contains localizations and should be able to run the and I'd expect all projects to be able to run the I see the code checks for this |
Hi, You might be right about the As for the |
Here it is @tinesoft $ npx nx gen-l10n apps/poc --verbose
NX Cannot find configuration for task apps/poc:gen-l10n
Error: Cannot find configuration for task apps/poc:gen-l10n
at ProcessTasks.createTask (/Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/create-task-graph.js:156:19)
at ProcessTasks.processTasks (/Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/create-task-graph.js:23:39)
at createTaskGraph (/Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/create-task-graph.js:194:21)
at createTaskGraphAndValidateCycles (/Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/run-command.js:62:63)
at /Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/run-command.js:85:27
at handleErrors (/Volumes/sourcecode/[redacted]/node_modules/nx/src/utils/params.js:9:30)
at runCommand (/Volumes/sourcecode/[redacted]/node_modules/nx/src/tasks-runner/run-command.js:83:52)
at Object.runOne (/Volumes/sourcecode/[redacted]/node_modules/nx/src/command-line/run/run-one.js:53:59)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handleErrors (/Volumes/sourcecode/[redacted]/node_modules/nx/src/utils/params.js:9:24) regarding the gen-l10n command it should only be available on projects and modules that have generation anabled and the l10n.yaml file I believe. for the assemble one I'm not sure. |
Plugin Name
create-nx-flutter
Nx Report
Node : 20.2.0
OS : darwin-arm64
npm : 9.6.6
nx (global) : 19.2.0
nx : 19.2.0
@nx/js : 19.2.0
@nx/workspace : 19.2.0
@nx/devkit : 19.2.0
@nrwl/tao : 19.2.0
typescript : 5.4.5
Registered Plugins:
@nxrocks/nx-flutter
Community plugins:
@nxrocks/nx-flutter : 9.0.2
Expected Behaviour
running
nx run-many -t test
should run tests on all flutter modules
Actual Behaviour
this is what happens
despite having projects in the workspace.
Steps to reproduce the behaviour
The text was updated successfully, but these errors were encountered: