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

Fix bezier-vscode extension bug #2507

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

Conversation

yangwooseong
Copy link
Collaborator

@yangwooseong yangwooseong commented Nov 25, 2024

Self Checklist

  • I wrote a PR title in English and added an appropriate label to the PR.
  • I wrote the commit message in English and to follow the Conventional Commits specification.
  • I added the changeset about the changes that needed to be released. (or didn't have to)
  • I wrote or updated documentation related to the changes. (or didn't have to)
  • I wrote or updated tests related to the changes. (or didn't have to)
  • I tested the changes in various browsers. (or didn't have to)
    • Windows: Chrome, Edge, (Optional) Firefox
    • macOS: Chrome, Edge, Safari, (Optional) Firefox

Related Issue

  • None

Summary

  • vscode extension 을 실행시키면 아래의 에러가 뜨면서 동작하지 않는 버그를 수정합니다.
Activating extension 'ChannelCorp.bezier-vscode' failed: Cannot find module 'vscode-languageclient/node'
Require stack:
- /Users/mb-188/.cursor/extensions/channelcorp.bezier-vscode-0.3.0/dist/client.js

Details

  • 익스텐션 패키지에 의존성이 담기지 않아서 생기는 버그로 추정됩니다. 왜 0.1.0 버전에서 잘 동작했는지는 잘 모르겠습니다.
  • 의존성을 패키지에 포함시키려면 .vscodeignore 에서 상위 디렉토리에 있는 node_modules 하위의 vscode-* 의존성을 모두 화이트리스트로 지정해야 합니다. 그런데 이렇게 하면 vsce package 명령어에서 에러가 뜹니다.
  • vsce package --no-yarn -> npm 으로 패키지를 시도하면 invalid relative path: extension/../../vscode-languageclient/node 에러가 뜹니다. 상대경로를 제대로 resolve 하지 못하는 것 같습니다.
  • vsce package -> yarn 으로 패키지를 시도하면 vsce 내에서 yarn list --no-prod --no-json 명령어를 수행하는데, 이 명령어는 yarn v1 에서만 있는 명령어라 현재 베지어 레포의 yarn 버전과 맞지 않아서 명령어를 실행할 수 없다는 에러가 뜹니다. yarn list --no-prod --no-json를 yarn 플러그인으로 대체하는 옵션까지 했지만 vsce ls 결과물에 의존성이 포함되지 않았습니다.
  • 그리하여 이 PR 내용처럼 lsp-sample 처럼 client, server 폴더 구조를 분리하고 각 폴더에 의존성을 설치했는데, 이렇게 하면 루트에서 빌드할 때마다 client, server 각각에 의존성을 설치해야 합니다. (#) 아예 bezier-vscode 의 yarn build 스크립트를 실행하면 client, server 의존성 설치를 하도록 해야 할까 싶기도 하네요.. 좋은 생각 있으신가요? @sungik-choi
  • 의존성을 패키지에 포함하면 위의 에러가 안뜨는 것은 확인했습니다. 로컬에서 패키징해서 설치하려면 client, server 의존성 설치 후 루트에서 yarn workspace bezier-vscode package 로 나오는 .vsix 파일을 우클릭해서 설치 하면 됩니다.

Breaking change? (Yes/No)

  • No

References

  • None

@yangwooseong yangwooseong added fix PR related to bug fix bezier-vscode Issue or PR related to bezier-vscode labels Nov 25, 2024
@yangwooseong yangwooseong self-assigned this Nov 25, 2024
Copy link

channeltalk bot commented Nov 25, 2024

Copy link

changeset-bot bot commented Nov 25, 2024

🦋 Changeset detected

Latest commit: 4d83420

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yangwooseong yangwooseong marked this pull request as draft November 25, 2024 06:06
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.31%. Comparing base (3c0a1e2) to head (4d83420).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2507   +/-   ##
=======================================
  Coverage   82.31%   82.31%           
=======================================
  Files         143      143           
  Lines        2985     2985           
  Branches      919      923    +4     
=======================================
  Hits         2457     2457           
  Misses        497      497           
  Partials       31       31           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bezier-vscode Issue or PR related to bezier-vscode fix PR related to bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant