You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go.work.sum is not included in default inputs - this results in changes to go.work not "affecting" go projects
Caching is not enabled by default for build/test/lint - this results in go project tasks re-executing (e.g., run-many -t build) when nothing has changed
Task inputs/outputs are not defined - this results in not incorporating common nx namedInputs such as sharedGlobals, defaults, etc.
@nx-go is a plug-in and infers project dependencies and should therefore infer reasonable defaults for cache/inputs/outputs. While separate from #152 which contemplates inferred tasks themselves, the inferred defaults for @nx-go/nx-go:build, @nx-go/nx-go:test, etc. are related.
I believe the following are reasonable defaults to consider for build/test/lint:
{
"inputs": [
"{projectRoot}/go.mod",
"{projectRoot}/go.sum",
"{projectRoot}/**/*.go",
"{workspaceRoot}/go.work",
"{workspaceRoot}/go.work.sum",
"^production", // if the named input exists"sharedGlobals"// if the namedInput exists
],
"cache": true,
"outputs": [
"{options.outputPath}"// for build only
]
}
Appreciate the consideration and feedback/input welcomed!
Solution you'd like
Currently, the default tasks (e.g., build, test, lint, etc.) generated by @nx-go have a few limitations/issues:
go.work
is not included in default inputs (see Go apps affecting projects incorrectly #134) - this results in changes to go.work not "affecting" go projectsgo.work.sum
is not included in default inputs - this results in changes to go.work not "affecting" go projectsrun-many -t build
) when nothing has changedsharedGlobals
,defaults
, etc.@nx-go
is a plug-in and infers project dependencies and should therefore infer reasonable defaults for cache/inputs/outputs. While separate from #152 which contemplates inferred tasks themselves, the inferred defaults for@nx-go/nx-go:build
,@nx-go/nx-go:test
, etc. are related.I believe the following are reasonable defaults to consider for build/test/lint:
Appreciate the consideration and feedback/input welcomed!
Is your feature request related to a problem?
#134
Alternatives you've considered
Manually defining/adjusting targets achieves the desired outcome.
Additional Information
See related issues #134 & #152
The text was updated successfully, but these errors were encountered: