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: emit declarations with a tool other than tsc #648

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

alexeagle
Copy link
Member

@alexeagle alexeagle commented Jul 2, 2024

Mirrors how the transpiler attribute works.

Here's a profile, showing that frontend and backend targets are type-checked in parallel with core even though they both depend on it. The small green boxes in the upper-left are the 10ms swc action that produces the core/index.d.ts file needed by the type-checker for frontend and backend

Screenshot from 2024-07-02 15-45-24


Changes are visible to end-users: yes

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

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:

Copy link

aspect-workflows bot commented Jul 2, 2024

Test

All tests were cache hits

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


Buildifier      Format

@@ -5,7 +5,8 @@ ts_project(
name = "backend",
declaration = True,
tsconfig = "//examples/isolated_declarations:tsconfig",
deps = ["//examples/isolated_declarations/core"],
# FIXME: should just be core:core
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbedard this is the next step in the PR, to make the SWC-transpiled declarations appear as the types on the terminal rule in the macro produced for core:core. I have to juggle the logic for when to produce a js_library target "tree".

Also before landing this I think the declaration producing rule should be in rules_swc rather than a bzl file here.

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

2 participants