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

Issues with Generated Metadata of the V6 Code Generator #849

Closed
sarangan12 opened this issue Jan 25, 2021 · 3 comments
Closed

Issues with Generated Metadata of the V6 Code Generator #849

sarangan12 opened this issue Jan 25, 2021 · 3 comments
Labels

Comments

@sarangan12
Copy link
Member

sarangan12 commented Jan 25, 2021

This epic is created as a result of my work in the creation of initial version of Quantum SDK. While trying to check-in this initial version (Azure/azure-sdk-for-js#13345), I encountered some gaps in the V6 SDK generator. I have listed the gaps here. I will create separate issues for all of them and then work on it.

(Note: There are almost no issues with the generated code. Most of the issues that I found are related to metadata only)

Generated Code

  1. Change @hidden on Client and ClientContext Classes to @internal
  2. In addition to Client and ClientContextClasses, add the @internal to classes in the operations too.
  3. Export operations in the index file. - Include Operations in the index.ts file #856
    package.json
  4. The generated package.json uses uglify plugin. All of our generated SDKs use module commonjs. This module and uglify do not work together well. So, this plugin must be removed.
  5. The following scripts need further work:
  • Task - docs: typedoc plugin is not part of our dependency. So, the docs script is not working.
  • Task - format: prettier plugin is not part of our dependency. So, the format script is not working.
  • Task - prebuild: rimraf plugin is not part of our dependency. So, the prebuild script is not working.
  • Task - check-format: prettier plugin is not part of our dependency. So, the check-format script is not working.
  • Task - lint: eslint plugin is not part of our dependency. So, the lint script is not working.
  • Task - lint-fix: eslint plugin is not part of our dependency. So, the lint-fix script is not working.
  • Task - coverage: nyc plugin is not part of our dependency. So, the coverage script is not working.
  • Task - build:node: cross-env plugin is not part of our dependency. So, the build:node script is not working.
  • Task - build:browser: cross-env plugin is not part of our dependency. So, the build:browser script is not working.
  • Task - build:test:node: cross-env plugin is not part of our dependency. So, the build:test:node script is not working.
  • Task - build:test:browser: cross-env plugin is not part of our dependency. So, the build:test:browser script is not working.
  • Task - build:samples: dev-tool plugin is not part of our dependency. So, the build:samples script is not working. (Also we do not have samples folder)
  • Task - execute:samples: This script is really not required.
  • Task - integration-test:browser: cross-env & karma plugins are not part of our dependency. So, the integration-test:browser script is not working.
  • Task - integration-test:node: cross-env & mocha plugins are not part of our dependency. So, the integration-test:node script is not working. (Also we do not have test folder or sample test)
  • Task - unit-test & test: mocha & nyc plugins are not available.

tsconfig.json

  1. Usually, all our SDKs extend from a standard tsconfig. But, it is not happening in the V6 generator. It would be good if we can have the extended tsconfig generated.
  2. Usually, in all our SDKs, the outDir is dist-esm. But, in V6 generator, it is set to esm. This creates unneccessary confusion in compilation and rollup. This has to be fixed.
  3. Even with the stand-alone tsconfig file, the module property is set to es5. All our SDKs use commonjs. So, this must be fixed.

rollup.config.js

  1. The input file points to the dist-esm folder instead of esm folder. This has to be corrected.
  2. Use the standard rollup.config.js specified in dev-tool

README.md
The README file must follow a certain format and heading. (Refer the README file of Quantum Data Plane SDK.) The V6 generated README file does not follow this. This has to be fixed.

api-extractor.json
The mainEntryPointFilePath property in this file is not pointing to correct file. This has to be fixed.

@deyaaeldeen
Copy link
Member

Thanks a lot @sarangan12 for creating this issue. It also bothered me a lot and I wanted to fix it but did not have time. Can we also add to use the standard rollup.config.js specificed in dev-tool? You can see an example of it in text analytics.

@sarangan12
Copy link
Member Author

Thanks a lot @sarangan12 for creating this issue. It also bothered me a lot and I wanted to fix it but did not have time. Can we also add to use the standard rollup.config.js specificed in dev-tool? You can see an example of it in text analytics.

Done

@sarangan12
Copy link
Member Author

I am closing this issue for now. We have already made several changes and these appear to be irrelevant

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

No branches or pull requests

2 participants