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

bundler: fix bugs #1105

Merged
merged 59 commits into from
Oct 2, 2020
Merged

bundler: fix bugs #1105

merged 59 commits into from
Oct 2, 2020

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Sep 24, 2020

swc_bundler:

swc_ecma_transforms:

@kdy1 kdy1 added this to the v1.2.34 milestone Sep 24, 2020
@kdy1 kdy1 self-assigned this Sep 24, 2020
@kdy1 kdy1 changed the title bundler: fix bugs bundler: fix calculation of least common ancestor Sep 24, 2020
@CLAassistant
Copy link

CLAassistant commented Sep 25, 2020

CLA assistant check
All committers have signed the CLA.

@kdy1 kdy1 changed the title bundler: fix calculation of least common ancestor bundler: fix bugs Sep 27, 2020
@kdy1
Copy link
Member Author

kdy1 commented Sep 29, 2020

@kitsonk I think I fixed all of them. Can you try again?

@kitsonk
Copy link
Contributor

kitsonk commented Sep 30, 2020

@kitsonk I think I fixed all of them. Can you try again?

Ooops... sorry, I missed this. I am trying now but I am starting to wrap up for my day...

@kdy1
Copy link
Member Author

kdy1 commented Sep 30, 2020

It's okay, I forget things so well.

@kitsonk
Copy link
Contributor

kitsonk commented Sep 30, 2020

@kdy1 I have re-tested with this branch. Thank you for fixing lots of the bugs. There are still a couple things:

  • I am still getting a stack-overflow with the example I gave in swc_bundler: does not handle namespace re-exports #1110 on my branch here.

  • The output for swc_bundler: export * as wrongly emitted #1118 is still the following for me:

    export * as a;
  • I have also been using https://deno.land/x/[email protected]/mod.ts and https://deno.land/x/[email protected]/examples/server.ts as bundling tests, which are complex and exercise a lot of scenarios. I've run it again, and with lots of the other issues fixed, I am seeing a new error (possibly one that existed but I didn't see it because of the other errors). I will try to get that one to reproduce as well, but there is at least another potential bug out there.

@kdy1
Copy link
Member Author

kdy1 commented Oct 1, 2020

@kitsonk Did you invoked typescript::strip before bundling?
I tested but

export * as a from "./a.ts";

works with typescript::strip


Also, I got

error: failed to select a version for `swc_common`.
    ... required by package `deno_lint v0.2.0 (/Users/kdy1/projects/deno_lint)`
    ... which is depended on by `deno v1.4.2 (/Users/kdy1/projects/deno/cli)`
versions that meet the requirements `=0.10.3` are: 0.10.3

while trying to build it

@kitsonk
Copy link
Contributor

kitsonk commented Oct 1, 2020

@kdy1 I will take a look again...


As far as the building, you would have to clone deno_lint and deno_doc and update the swc to local builds as well... a little bit painful at the moment.

@kitsonk
Copy link
Contributor

kitsonk commented Oct 1, 2020

@kdy1 I've looked again, and yes, the loader does the stripping before bundling. Our folding though is a bit more complex than the PR you had done, as we have some other things we need to support. Here is the loader in my PR. I am wondering if some of the other passes are causing the problems/challenges?

@kdy1
Copy link
Member Author

kdy1 commented Oct 1, 2020

I am wondering if some of the other passes are causing the problems/challenges?

I think stack overflow may not be related to bundler.

Also, I can't guess why #1118 is still the issue. export * as a from "./a.ts"; should be removed by typescript::strip, not bundler.

@kdy1
Copy link
Member Author

kdy1 commented Oct 2, 2020

I'll fix remaining issues with a separate pr

@kdy1 kdy1 marked this pull request as ready for review October 2, 2020 02:07
@kdy1 kdy1 merged commit 9879fa5 into swc-project:master Oct 2, 2020
@kdy1 kdy1 deleted the bugs branch October 2, 2020 02:07
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.