# 일본 한달살이 17일차 (5월 14일)

## 아침

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715641720003/453ae963-6dd1-4f15-ad55-5d5c5ac4ac14.png align="center")

아침으론 간단하게 어제 사 온 고기를 먹었다.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715641756736/78231085-ff8e-4777-9bf4-e7a1a606f574.png align="center")

고기만 먹은 건 아니고 햇반도 돌려먹었다. 아침을 먹었는데도 시간이 너무 일러서 마트나 한번 다녀왔다.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715641810900/ae82b776-67e0-48ed-891f-271835b5778e.png align="center")

그리고 제로 아이스크림을 종류별로 사왔다. 하나 먹고 잠깐 뛰고 와서 씻고 작업을 시작했다.

---

일을 하다가 점심을 적당히 먹었고, 내일이 노는 날이라 저녁을 거하게 먹었다.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715693091021/31ed20ee-bad4-41f7-a984-387634b77784.png align="center")

* 비빔면
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715693100513/f736597b-0040-4f5e-823d-0cb25fd9b363.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715693102851/eaa6ecfe-fae5-4c22-a87c-651a5b60504c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715693105591/b2cfbe4b-7b23-42d6-b44b-2ffcb12689c0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715693107421/1b2dd15b-989e-461d-8b52-d3a89d83e2ac.png align="center")

---

## 작업일지

### `/plugins`: 새 버전 배포

* [https://github.com/swc-project/plugins/pull/301](https://github.com/swc-project/plugins/pull/301)
    

`next.js` 의 `swc_core` 을 업데이트하려는데 플러그인 배포가 잘못된 상태여서 모든 플러그인을 새로 배포했다.

### `swc_core` 업데이트 PR 리베이스

* [https://github.com/vercel/turbo/pull/8097](https://github.com/vercel/turbo/pull/8097)
    
* [https://github.com/vercel/next.js/pull/65450](https://github.com/vercel/next.js/pull/65450)
    

이 작업이 생각보다 귀찮은 작업이다. 오늘도 두 레포지토리 간의 의존성 버전 차이 때문에 한참 삽질했다.

### 터보팩 Tree shaking PR

* [https://github.com/vercel/turbo/pull/7986](https://github.com/vercel/turbo/pull/7986)
    

팀원이 어제 중간 리뷰해주셨다. 피드백을 일부 반영한 뒤 일단 실행형 테스트를 실행해서 확인해봤다. 그런데 테스트 종료가 안 돼서 `dbg!` 몇 개 추가하고 `-- --nocapture` 로 돌렸다. 한참 시도해보다가 일단 실행형 테스트는 내버려두고 리뷰부터 다 반영하기로 했다.

---

리뷰가 테스트 결과에 대한 것들이라서 로직 고치느라 한참 삽질했는데 유닛 테스트는 기다리는 시간이 길지 않은 관계로 자세히 기록하진 않았다.

---

리뷰 다 반영한 뒤 다시 컴파일 오래 걸리는 작업을 시작했다.

```plaintext
[error] Error: Failed to load chunk chunks/_5e8b7f._.js from module [project]/postcss.config.js/transform.ts { CONFIG => "[project]/postcss.config.js_.loader.mjs [postcss] (ecmascript) <facade>" } [postcss] (ecmascript, async loader) <facade>: SyntaxError: await is only valid in async functions and the top level bodies of modules
```

몇시간을 투자해 로그를 추가하다가 겨우겨우 근본적인 문제가 무엇이었는지 알 수 있었다. `async` 모듈에 `async` 키워드가 붙어있지 않았던 것이다.

에러 메시지를 알아냈으니 팀 채널에 질문을 남겼고, 팀원 한 분이 금방 응답해주셔서 빠르게 고쳤다.

```rust

#[turbo_tasks::value_impl]
impl ChunkItem for EcmascriptModulePartChunkItem {

    #[turbo_tasks::function]
    fn is_self_async(&self) -> Vc<bool> {
        self.module.is_async_module()
    }
}
```

이것이 변경사항이다.

---

### SWC loadable 플러그인 버그 수정

* [https://github.com/swc-project/plugins/issues/300](https://github.com/swc-project/plugins/issues/300)
    

간단한 버그여서 금방 고쳤다.
