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

tshy build failed without full error messages #29514

Open
MaryGao opened this issue Apr 30, 2024 · 2 comments
Open

tshy build failed without full error messages #29514

MaryGao opened this issue Apr 30, 2024 · 2 comments
Assignees
Labels
dev-tool Issues related to the Azure SDK for JS dev-tool

Comments

@MaryGao
Copy link
Contributor

MaryGao commented Apr 30, 2024

Could someone know how to adjust our configuration to show complete error message in tshy?

See pr #29513, when I ran the rush update && rush build -t @azure-rest/ai-vision-face I would fail with build steps. But the message didn't clearly show why my code can't pass the build. And it would be helpful when we debug the failure reasons and this also happened in our swagger ci(link).

--[ FAILURE: @azure-rest/ai-vision-face ]--------------------[ 5.63 seconds ]--

writing tsconfig files...
using existing tsconfig.json
building C:\Users\marygao\project\azure-sdk-azure-sdk-for-js\azure-sdk-for-js\sdk\face\ai-vision-face-rest
tshy config {
  exports: { './package.json': './package.json', '.': './src/index.ts' },
  dialects: [ 'esm', 'commonjs' ],
  esmDialects: [ 'browser', 'react-native' ],
  selfLink: false
}
exports {
  ...10 lines omitted...
    import: { types: './dist/esm/index.d.ts', default: './dist/esm/index.js' },
    require: {
      types: './dist/commonjs/index.d.ts',
      default: './dist/commonjs/index.js'
    }
  }
}
set dialect { where: 'src', mode: 'esm' }
building esm
build failed


Operations failed.

Ideally I would like to have following messages.

src/index.ts:11:1 - error TS2308: Module "./parameters.js" has already exported a member named 'CreateLivenessSessionParameters'. Consider explicitly re-exporting to resolve the ambiguity.

11 export * from "./models.js";
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/index.ts:11:1 - error TS2308: Module "./parameters.js" has already exported a member named 'CreateLivenessWithVerifySessionParameters'. Consider explicitly re-exporting to resolve the ambiguity.

11 export * from "./models.js";
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/parameters.ts:10:3 - error TS2440: Import declaration conflicts with local declaration of 'CreateLivenessSessionParameters'.

10   CreateLivenessSessionParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/parameters.ts:11:3 - error TS2440: Import declaration conflicts with local declaration of 'CreateLivenessWithVerifySessionParameters'.

11   CreateLivenessWithVerifySessionParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 4 errors in 2 files.

Errors  Files
     2  src/index.ts:11
     2  src/parameters.ts:10
writing tsconfig files...
using existing tsconfig.json
building C:\Users\marygao\project\autorest.typescript\packages\typespec-test\test\faceai\generated\typespec-ts
tshy config {
  exports: { './package.json': './package.json', '.': './src/index.ts' },
  dialects: [ 'esm', 'commonjs' ],
  esmDialects: [ 'browser', 'react-native' ],
  selfLink: false
}
@github-actions github-actions bot added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Apr 30, 2024
@MaryGao MaryGao changed the title tshy build failed without any proper messages tshy build failed without full error messages Apr 30, 2024
@MaryGao
Copy link
Contributor Author

MaryGao commented Apr 30, 2024

@jeremymeng Not sure if you could help there?

@MaryGao MaryGao added dev-tool Issues related to the Azure SDK for JS dev-tool and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Apr 30, 2024
@jeremymeng
Copy link
Contributor

tshy docs mentioned some env var that may help. should we enable more verbose logs for all builds? https://github.com/isaacs/tshy?tab=readme-ov-file#making-noise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tool Issues related to the Azure SDK for JS dev-tool
Projects
None yet
Development

No branches or pull requests

3 participants