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

Volar generated type been added #354

Closed
3 tasks done
RayGuo-ergou opened this issue Jul 24, 2024 · 3 comments
Closed
3 tasks done

Volar generated type been added #354

RayGuo-ergou opened this issue Jul 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@RayGuo-ergou
Copy link

Describe the bug

Volar generated types like __VLS_Element will be declared in built files.

This happens on version ^4.0.0 I am guessing it's caused by upgrading vue-tsc?

This will cause type conflict when import the library.

Reproduction

https://github.com/RayGuo-ergou/dts-reproduction

Steps to reproduce

  1. Clone the repo
  2. Open this file or run build

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
    Memory: 42.63 GB / 46.66 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.15.0 - /usr/local/bin/node
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.6.0 - /usr/local/bin/pnpm
    bun: 1.0.26 - ~/.bun/bin/bun
  npmPackages:
    @vitejs/plugin-vue: ^5.0.5 => 5.0.5
    vite: ^5.3.4 => 5.3.4
    vite-plugin-dts: 4.0.0-beta.1 => 4.0.0-beta.1

Validations

@qmhc
Copy link
Owner

qmhc commented Jul 24, 2024

Could you provide what type conflict will be caused?

@RayGuo-ergou
Copy link
Author

RayGuo-ergou commented Jul 24, 2024

Error:

Definitions of the following identifiers conflict with those in another file:
__VLS_IntrinsicElements, __VLS_Element, __VLS_GlobalComponents, __VLS_IsAny,
__VLS_PickNotAny, __VLS_intrinsicElements, __VLS_SelfComponent, __VLS_WithComponent,
__VLS_FunctionalComponentProps, __VLS_UnionToIntersection, __VLS_OverloadUnionInner,
__VLS_OverloadUnion, __VLS_ConstructorOverloads, __VLS_NormalizeEmits, __VLS_PrettifyGlobal [6200]

This conflict because these types are auto-generated by the Volar language server. When a library declares same types, it results in naming conflicts.

@qmhc qmhc closed this as completed in 1935414 Jul 30, 2024
qmhc added a commit that referenced this issue Jul 30, 2024
@DerYeger
Copy link

This issue is still present with 4.0.0-beta.2 and the above reproduction.

While certainly not minimal, I also have an end-to-end reproduction of the issue. See https://github.com/DerYeger/yeger/actions/runs/10174119328/job/28139332486#step:4:1227.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants