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

support isolated declarations #636

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MichaelMitchell-at
Copy link
Contributor

@MichaelMitchell-at MichaelMitchell-at commented Jun 25, 2024

Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: no
  • Breaking change (forces users to change their own code or config): yes
  • Suggested release notes appear below: no

Test plan

  • Manual testing; please provide instructions so we can reproduce: Used in the Airtable monorepo. Projects using isolated declarations pass isolated_declarations=True to ts_project. bazel build --build_tag_filters=typing --output_groups=types,typecheck <target>

@CLAassistant
Copy link

CLAassistant commented Jun 25, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

aspect-workflows bot commented Jun 25, 2024

Test

All tests were cache hits

80 tests (100.0%) were fully cached saving 12s.


Buildifier      Format

@alexeagle alexeagle changed the title experiment with supporting isolated declarations support isolated declarations Jun 29, 2024
@alexeagle
Copy link
Member

Rebased on the TS upgrade, so this example should be functional now. I'd still like to verify all the actions have expected inputs and outputs, and maybe add an analysis test showing that.

@ericrafalovsky
Copy link
Contributor

Perhaps out of scope of this PR, but it would be interesting to consider an API similar to https://docs.aspect.build/rulesets/aspect_rules_ts/docs/rules#transpiler to allow specifying a non-tsc decleration emit tool (such as swc)

@alexeagle
Copy link
Member

TypeScript doesn't ship a release yet that calls the new transpileDeclaration API, and I don't know of another tool that does. Maybe we'll have to cut scope here to just support the part of the feature which verifies your code is ready for isolatedDeclarations semantics but doesn't actually give the speed improvement yet.

@alexeagle
Copy link
Member

Merged a PR on rules_swc to mirror the newest release that has the declaration emit feature, I'll give it a try...

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

Successfully merging this pull request may close these issues.

None yet

4 participants