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] yarn zero install 적용 #314

Merged
merged 12 commits into from
Apr 7, 2024
Merged

[Fix] yarn zero install 적용 #314

merged 12 commits into from
Apr 7, 2024

Conversation

loevray
Copy link
Contributor

@loevray loevray commented Apr 2, 2024

📋 Issue Number

close #313

💻 구현 내용

  • .yarn/cache파일은 보지 않으셔도 됩니다!
  • yarn zero install을 성공적으로 셋팅하였습니다.
  • zero install 셋팅을 위하여 핵심패키지 네가지의 버전업이 이루어졌습니다.
    • typescript
    • types/node
    • yarn
    • yarn/sdks
  • CI도중 의존성 설치시 설치시간 약 25~30% 내외 감소(평균 15초 => 10초)
  • 로컬 적용시 혹시라도 오류 발생할 수 있으니, 브랜치 전환 후 테스트 부탁드립니다...😢
  • 이제 다른 팀원이 패키지 설치했을때 yarn install하지 않아도 됩니다!! (unplugged된 패키지들은 제외)

📷 Screenshots

zero install 도입 전

image

zero install 도입 후

image

🤔 고민사항

  1. 바뀌지 않은 패키지라면 CI환경에 캐싱할 수 있을 것 같은데 어떻게 하면 좋을까 고민입니다!
    2. 아직 500kb가넘는 청크가 존재하는데 무엇때문에 이렇게 큰걸까요...?! => 원인 찾았습니다
    image
  2. 빌드 할때 경고와 함께 되던데 수정해야할까요...?🙄

@loevray loevray marked this pull request as draft April 2, 2024 13:06
@loevray loevray self-assigned this Apr 2, 2024
@loevray loevray added the fix 수정사항 label Apr 2, 2024
@loevray loevray changed the title [Test] zero install 테스트용 pr입니다 [Fix] yarn zero install 적용 Apr 2, 2024
@loevray loevray requested review from dlsxjzld, joonwonBaek and yejinleee and removed request for dlsxjzld April 2, 2024 13:39
@loevray loevray marked this pull request as ready for review April 2, 2024 13:40
Copy link
Contributor

@dlsxjzld dlsxjzld left a comment

Choose a reason for hiding this comment

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

반쪽짜리 yarn berry에서 진정한 yarn berry가 되었네요!!! 👍
zero-install까지 적용하시다니... 영현님 덕분에 많이 배워갑니다 👍👍👍

이제 다른 팀원이 패키지 설치했을때 yarn install하지 않아도 됩니다!! (unplugged된 패키지들은 제외)

  • zero-install 덕분에 모든 환경에서 동일한 유효성을 가져서 yarn install을 할 필요가 없어졌다는 것으로 이해했는데 맞을까요?! 🤔

바뀌지 않은 패키지라면 CI환경에 캐싱할 수 있을 것 같은데 어떻게 하면 좋을까 고민입니다!

빌드 할때 경고와 함께 되던데 수정해야할까요...?🙄

  • 컴포넌트를 잘게 쪼개면 해결되는 걸까요..?! 🫠


- name: Install dependencies
run: yarn install
run: yarn install --immutable
Copy link
Contributor

Choose a reason for hiding this comment

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

잘 몰라서 그러는데 --immutable-cache 는 추가하지 않은 이유가 있으신가요?! 🤔
스크린샷 2024-04-03 오후 9 42 32

Copy link
Contributor Author

@loevray loevray Apr 3, 2024

Choose a reason for hiding this comment

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

댓글로 설명하기엔 살짝 길어서 블로그링크 첨부해드릴게요!

https://velog.io/@loevray/TIL-84-yarnberry-zero-install

느낀점 윗 윗 목차 보시면 됩니다!


  1. 넵! unplugged된 파일을 제외한 모든 의존성 파일이 yarn/cache 폴더에 들어간채 커밋 되었고 pnp.cjs로 패키지 경로와 잘 링크되어있어서 이제 yarn install 할일이 거의 없을거에요
  2. 오 저도 한번 살펴봤던 액션인데 그게 맞는 것 같아요 ㅎㅎ 다음엔 캐싱 적용해보겠습니다
  3. 음 경고문구는 다시한번 보고 구글링 해보겠습니다ㅎㅎ

@loevray loevray merged commit c3e6510 into main Apr 7, 2024
1 check passed
@loevray loevray deleted the ZeroInstallTest1 branch April 7, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 수정사항
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] yarn zero install 적용
2 participants