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

feat(bazel): add dts bundler as action to ng_module #28588

Closed
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@alan-agius4
Copy link
Contributor

alan-agius4 commented Feb 7, 2019

feat(bazel): add dts bundler as action to ng_module

This enabled dts flattening in the final distributable package.

Notes:

  • For the time being this is an opt-in feature via the ng_module attribute bundle_dts, however in the near future this will be turned on by default.
  • This only supports the legacy compiler ngc, as ngtsc emits namespaced imports import * as __ from local modules which is not supported for the time being by API Extractor. See: Microsoft/web-build-tools#1029

Ref: TOOL-611

@alan-agius4 alan-agius4 requested review from angular/fw-dev-infra as code owners Feb 7, 2019

@googlebot googlebot added the cla: yes label Feb 7, 2019

@alan-agius4 alan-agius4 force-pushed the alan-agius4:dts-bundle-packages branch 4 times, most recently from 2c12c2e to 82ee717 Feb 7, 2019

@alan-agius4 alan-agius4 changed the title Dts bundle packages feat(bazel): add dts bundler as action to ng_module Feb 7, 2019

@alan-agius4 alan-agius4 force-pushed the alan-agius4:dts-bundle-packages branch 3 times, most recently from 97b103c to 5dc32b9 Feb 7, 2019

@alexeagle
Copy link
Contributor

alexeagle left a comment

Awesome, this looks really close

Show resolved Hide resolved packages/bazel/src/api-extractor/BUILD.bazel Outdated
Show resolved Hide resolved packages/bazel/src/api-extractor/index.ts Outdated
Show resolved Hide resolved packages/bazel/src/api-extractor/tsconfig.json Outdated
Show resolved Hide resolved packages/bazel/src/ng_module.bzl Outdated
Show resolved Hide resolved packages/bazel/src/ng_module.bzl Outdated
Show resolved Hide resolved packages/bazel/src/ng_package/ng_package.bzl Outdated
Show resolved Hide resolved packages/bazel/src/ng_package/packager.ts
Show resolved Hide resolved packages/bazel/src/ng_package/packager.ts

@alan-agius4 alan-agius4 force-pushed the alan-agius4:dts-bundle-packages branch 3 times, most recently from 41e986a to 277191c Feb 8, 2019

@mhevery mhevery added the comp: bazel label Feb 8, 2019

@ngbot ngbot bot added this to the needsTriage milestone Feb 8, 2019

@alan-agius4 alan-agius4 force-pushed the alan-agius4:dts-bundle-packages branch from 277191c to 932737c Feb 11, 2019

alan-agius4 added a commit to alan-agius4/angular that referenced this pull request Feb 11, 2019

refactor: replace local namespaced imports with named
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

Relates to angular#28588

@alan-agius4 alan-agius4 referenced this pull request Feb 11, 2019

Closed

build: enable bundle_dts for upgrade package #28642

2 of 12 tasks complete
@alexeagle

This comment has been minimized.

Copy link
Contributor

alexeagle commented Feb 12, 2019

@alexeagle

This comment has been minimized.

Copy link
Contributor

alexeagle commented Feb 13, 2019

fixed? presubmit

@alexeagle

This comment has been minimized.

Copy link
Contributor

alexeagle commented Feb 13, 2019

still failing in g3: packages/bazel/src/ng_module.bzl", line 367, in ngc_compile_action [("--node_options=%s" % opt) for opt in node_opts] type 'string' is not iterable. You may still use len and string indexing. Use --incompatible_string_is_not_iterable=false to temporarily disable this check.

@alan-agius4

This comment has been minimized.

Copy link
Contributor Author

alan-agius4 commented Feb 13, 2019

alan-agius4 added some commits Feb 7, 2019

feat(bazel): add dts bundler as action to ng_module
This enabled dts flattening in the final distrubutable package.

Notes:
 - For the time being this is an opt-in feature via the `ng_module` attribute  `bundle_dts`, however in the near future this will be turned on by default.
 - This only supports the legacy compiler `ngc`, as `ngtsc` emits namespaced imports `import * as __` from local modules which is not supported for the time being by API Extractor. See: Microsoft/web-build-tools#1029

Ref: TOOL-611

@alan-agius4 alan-agius4 force-pushed the alan-agius4:dts-bundle-packages branch from 101a537 to a66823d Feb 13, 2019

@alexeagle

This comment has been minimized.

Copy link
Contributor

alexeagle commented Feb 13, 2019

Caretaker: the last presubmit was GREEN
and the saucelabs test is still busted

@mhevery mhevery closed this in 3d39100 Feb 14, 2019

mhevery added a commit that referenced this pull request Feb 14, 2019

mhevery added a commit that referenced this pull request Feb 14, 2019

mhevery added a commit that referenced this pull request Feb 14, 2019

alan-agius4 added a commit to alan-agius4/angular that referenced this pull request Feb 14, 2019

refactor: replace local namespaced imports with named
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

Relates to angular#28588

@alan-agius4 alan-agius4 deleted the alan-agius4:dts-bundle-packages branch Feb 16, 2019

@alexeagle alexeagle referenced this pull request Feb 19, 2019

Closed

build: enable bundle_dts for a number of packages #28726

1 of 3 tasks complete

alan-agius4 added a commit to alan-agius4/angular that referenced this pull request Feb 21, 2019

refactor: replace local namespaced imports with named
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

See: Microsoft/web-build-tools#1029

Relates to angular#28588

alan-agius4 added a commit to alan-agius4/angular that referenced this pull request Feb 21, 2019

refactor: replace local namespaced imports with named
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

See: Microsoft/web-build-tools#1029

Relates to angular#28588

IgorMinar added a commit that referenced this pull request Feb 22, 2019

refactor: replace local namespaced imports with named (#28642)
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

See: Microsoft/web-build-tools#1029

Relates to #28588

PR Close #28642

gkalpak added a commit to gkalpak/angular that referenced this pull request Feb 22, 2019

refactor: replace local namespaced imports with named (angular#28642)
At the moment, the API extractor doesn't support local namespaced imports, this will break the generation of flat dts files. When we turn on dts bundling for this package it will break. Hence this is the ground work needed for making this package compatable with the API extractor.

See: Microsoft/web-build-tools#1029

Relates to angular#28588

PR Close angular#28642

@alan-agius4 alan-agius4 referenced this pull request Mar 3, 2019

Open

Flatten typings, d.ts rollup #1228

0 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
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.