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

Be able to disable noEmit-true warning #800

Closed
jasonkuhrt opened this issue May 5, 2020 · 1 comment · Fixed by #1039
Closed

Be able to disable noEmit-true warning #800

jasonkuhrt opened this issue May 5, 2020 · 1 comment · Fixed by #1039
Labels
lang/ts Related to TypeScript language interop scope/tsconfig Related to interop with tsconfig settings/files type/improve Something existing is made better, does not affect the interface (example: better error message)

Comments

@jasonkuhrt
Copy link
Member

Perceived Problem

Ideas / Proposed Solution(s)

  • When the user knows they definitely warn noEmit, then, some ideas:
    • be able to disable the warning
    • use new explicit command like nexus check (keep nexus build warning, telling user to use nexus check if that was there intent)
    • pass flag to build like --no-emit (the doubling up being like a confirmation step that makes the warning go away)
@jasonkuhrt jasonkuhrt added type/improve Something existing is made better, does not affect the interface (example: better error message) scope/tsconfig Related to interop with tsconfig settings/files labels May 5, 2020
@jasonkuhrt jasonkuhrt mentioned this issue May 5, 2020
14 tasks
@jasonkuhrt
Copy link
Member Author

We can rethink this now that #866 is landing.

Nexus should force noEmit to always be true.

The tool that will be outputting is no long TS, but Nexus.

While its true that even with #866 users will be able to do --no-bundle it is only incidental that this makes TS be the thing doing the final output.

Even with --no-bundle, in the future, with #854, a bundler will become a core part of the tool chain.

So the new proposal is:

  • Nexus will always force-set the noEmit option in tsconfig to false. It will log a warning when it does this. The warning will have two forms:

    1. No value present before

    Example:

     We have set the property `compilerOptions.noEmit` in your tsconfig file to `true`. This helps you avoid emit unwanted files should you or some tool ever accidentally run `tsc` manually.
    
    1. false value present

    Example:

     We have set the property `compilerOptions.noEmit` in your tsconfig file to `true`. For some reason you had it explicitly set to `false`. You shouldn't need this. Nexus takes care of outputting your build. You should not be using `tsc` manually. If you disagree with this please open an issue (https://nxs.li/issues/create/feature) and let us know why!
    

@jasonkuhrt jasonkuhrt added the lang/ts Related to TypeScript language interop label Jun 12, 2020
jasonkuhrt added a commit that referenced this issue Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/ts Related to TypeScript language interop scope/tsconfig Related to interop with tsconfig settings/files type/improve Something existing is made better, does not affect the interface (example: better error message)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant