Skip to content

Conversation

@moreal
Copy link
Contributor

@moreal moreal commented Jan 26, 2026

Summary

packages/testing test:bun: ../vocab build:self: error: The module's source code could not be parsed: Expected ',', got '<eof>' at file:///home/runner/work/fedify/fedify/packages/vocab/src/vocab.ts:62464:38
packages/testing test:bun: ../vocab build:self:             "The followedMessage must b

According to logs that I see, it failed to run tsdown or cargo check by malformed vocab.ts. And it occurs when 2 or more tasks run the build:self script of @fedify/vocab package. It looks like race condition. And there is only one write behavior to vocab.ts directly. It is deno fmt.

So this pull request makes packages/vocab/scripts/codegen.ts script generate vocab.ts atomically. The atomic means there will be no write behavior on vocab.ts directly. It'll format vocab-{uuid}.ts with deno fmt ... and rename it to vocab.ts.

Related issue

I couldn't find related issue when searching with:

  • label:component/ci
  • "race"
  • "codegen"

Changes

  • Let packages/vocab/scripts/codegen.ts script generate src/vocab.ts which already formatted by deno fmt <generatedPath>
  • Let deno task compile in @fedify/vocab do not deno fmt. (moved to scripts/codegen.ts script)

Benefits

I believe this change will make CI more consistently from failing by codegen-related race condition.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
    • It doesn't change or implement public features.
  • Did you write some relevant docs about this change (if it's a new feature)?
    • It doesn't change or implement public features.
  • Did you write a regression test to reproduce the bug (if it's a bug fix)?
  • Did you write some tests for this change (if it's a new feature)?
    • It doesn't change or implement public features.
  • Did you run mise test on your machine?

Additional notes

In the long term, it would be good to introduce a monorepo tool, but for now, it will be useful for CI stability.

@issues-auto-labeler issues-auto-labeler bot added component/build Build system and packaging component/ci CI/CD workflows and GitHub Actions component/testing Testing utilities (@fedify/testing) labels Jan 26, 2026
@moreal
Copy link
Contributor Author

moreal commented Jan 26, 2026

47cd266 commit might be a better solution.

@moreal
Copy link
Contributor Author

moreal commented Jan 26, 2026

I believe this pull request can be replaced by #543

@moreal moreal closed this Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/ci CI/CD workflows and GitHub Actions component/testing Testing utilities (@fedify/testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant