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

swc_plugin_proxy-0.44.1 not compatible with swc_common-0.34.4 #9169

Closed
Mad-Kat opened this issue Jul 6, 2024 · 3 comments · Fixed by #9170
Closed

swc_plugin_proxy-0.44.1 not compatible with swc_common-0.34.4 #9169

Mad-Kat opened this issue Jul 6, 2024 · 3 comments · Fixed by #9170
Labels
Milestone

Comments

@Mad-Kat
Copy link

Mad-Kat commented Jul 6, 2024

Describe the bug

I've created a new plugin with the swc cli and could not compile it afterwards.

error[E0308]: mismatched types
  --> .../index.crates.io-6f17d22bba15001f/swc_plugin_proxy-0.44.1/src/comments/plugin_comments_proxy.rs:87:48
   |
87 |             comments.add_leading_comments(pos, comments);
   |                      --------------------      ^^^^^^^^ expected `Vec<Comment>`, found `&Box<dyn Comments>`
   |                      |
   |                      arguments to this method are incorrect
   |
   = note: expected struct `Vec<Comment>`
           found reference `&Box<dyn Comments>`
note: method defined here
  --> .../index.crates.io-6f17d22bba15001f/swc_common-0.34.4/src/comments.rs:33:8
   |
33 |     fn add_leading_comments(&self, pos: BytePos, comments: Vec<Comment>);
   |        ^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> .../index.crates.io-6f17d22bba15001f/swc_plugin_proxy-0.44.1/src/comments/plugin_comments_proxy.rs:117:49
    |
117 |             comments.add_trailing_comments(pos, comments);
    |                      ---------------------      ^^^^^^^^ expected `Vec<Comment>`, found `&Box<dyn Comments>`
    |                      |
    |                      arguments to this method are incorrect
    |
    = note: expected struct `Vec<Comment>`
            found reference `&Box<dyn Comments>`
note: method defined here
   --> .../index.crates.io-6f17d22bba15001f/swc_common-0.34.4/src/comments.rs:40:8
    |
40  |     fn add_trailing_comments(&self, pos: BytePos, comments: Vec<Comment>);
    |        ^^^^^^^^^^^^^^^^^^^^^

Input code

No response

Config

No response

Playground link (or link to the minimal reproduction)

https://gist.github.com/Mad-Kat/de900587a273deda6753455fa4133867

SWC Info output

No response

Expected behavior

After setup a new plugin, it compiles and the tests run.

Actual behavior

No response

Version

swc_core: 0.96.7

Additional context

No response

@kdy1
Copy link
Member

kdy1 commented Jul 6, 2024

You can run cargo update -p swc_plugin_proxy to update it

@kdy1 kdy1 added this to the Planned milestone Jul 6, 2024
@Mad-Kat
Copy link
Author

Mad-Kat commented Jul 6, 2024

Yes worked like a charm. Thank you so much for the speedy fix

@kdy1 kdy1 modified the milestones: Planned, v1.6.13 Jul 7, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Aug 6, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants