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

[rush] Getting "SUCCESS WITH WARNINGS" when there are no warnings #2600

Closed
kaiyoma opened this issue Apr 9, 2021 · 2 comments
Closed

[rush] Getting "SUCCESS WITH WARNINGS" when there are no warnings #2600

kaiyoma opened this issue Apr 9, 2021 · 2 comments

Comments

@kaiyoma
Copy link

kaiyoma commented Apr 9, 2021

Summary

I added a custom bulk command to generate docs for my project, which seems to be working, except rush also prints out this:

==[ SUCCESS WITH WARNINGS: 1 project ]=========================================

--[ WARNING: babel-plugin-generate-i18n-id ]----------------[ 10.89 seconds ]--

The thing is, there are no warnings from the underlying command and the exit code is 0.

Repro steps

Add this custom command:

    {
      "name": "build-docs",
      "commandKind": "bulk",
      "enableParallelism": true,
      "ignoreDependencyOrder": true,
      "summary": "Generate HTML documentation from TypeScript types.",
    },

Then add this script to a project:

    "build-docs": "typedoc",

(This assumes tsconfig.json has been set up appropriately.) Now run the command:

$ rush build-docs
Found configuration in C:\Work\web-components\rush.json


Rush Multi-Project Build Tool 5.43.0 - https://rushjs.io
Node.js version is 14.15.0 (LTS)

Found configuration in C:\Work\web-components\rush.json

Starting "rush build-docs"

Executing a maximum of 3 simultaneous processes...

==[ babel-plugin-generate-i18n-id ]================================[ 1 of 1 ]==

"babel-plugin-generate-i18n-id" completed with warnings in 10.57 seconds.



==[ SUCCESS WITH WARNINGS: 1 project ]=========================================

--[ WARNING: babel-plugin-generate-i18n-id ]----------------[ 10.57 seconds ]--




Projects succeeded with warnings.

rush build-docs (10.78 seconds)

If I run the underlying command directly (from within the project directory), I can see that everything works fine, there's nothing printed to STDERR, and the exit code is 0:

$ yarn run build-docs
yarn run v1.22.5
$ typedoc
Rendering [========================================] 100%
Info: Documentation generated at C:\Work\web-components\packages\babel-plugin-generate-i18n-id\docs
Done in 10.76s.

$ yarn run build-docs > /dev/null


$ echo $?
0

(Most importantly, the docs are indeed generated.)

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.43.0
rushVersion from rush.json? 5.43.0
useWorkspaces from rush.json? (unspecified)
Operating system? Windows 10
Would you consider contributing a PR? No
Node.js version (node -v)? 14.15.0
@kaiyoma
Copy link
Author

kaiyoma commented Apr 9, 2021

It turns out this was an issue in typedoc, but a really subtle one! typedoc is writing out 1 byte (a single newline) to STDERR even when it's successful. Rush is doing the right thing by marking it as "successful with warnings", but it was really hard to determine why. Sorry for the noise here. I've filed a bug against typedoc about this: TypeStrong/typedoc#1566

@kaiyoma kaiyoma closed this as completed Apr 9, 2021
@Elliott-Hu
Copy link

Maybe is some like 'in progress...'、‘loading...’ message in stderr, i make sure it`s not error, how can i filter it ?

https://stackoverflow.com/a/59941191/18265149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants