Skip to content

build: make cc_flare_library front-end-agnostic; upgrade vendored blade#211

Merged
chen3feng merged 1 commit into
masterfrom
starlark-compat-cc-flare-library
Jul 2, 2026
Merged

build: make cc_flare_library front-end-agnostic; upgrade vendored blade#211
chen3feng merged 1 commit into
masterfrom
starlark-compat-cc-flare-library

Conversation

@chen3feng

Copy link
Copy Markdown
Collaborator

Rewrites the two Python-only constructs in the cc_flare_library extension so it parses under a Starlark front-end as well as Blade's restricted Python DSL — identical behaviour under Blade:

  • assert len(srcs) == 1, msgif len(srcs) != 1: fail(msg)
  • deps is Nonedeps == None
  • implicit adjacent-string concatenation → explicit +

isinstance is kept (both front-ends provide it). This lets flare build under a Go reimplementation of Blade (blade-go) without changing the current build.

Also upgrades the vendored blade (thirdparty/blade/blade.zip + GITVERSION) to blade-build master, which adds the fail() builtin the change above uses.

🤖 Generated with Claude Code

Rewrite the two Python-only constructs in the cc_flare_library extension so it
parses under a Starlark front-end as well as Blade's (restricted) Python DSL,
with identical behaviour under Blade:

- `assert len(srcs) == 1, msg` -> `if len(srcs) != 1: fail(msg)`
- `deps is None` -> `deps == None`
- implicit adjacent-string concatenation -> explicit `+`

`isinstance` is kept (both front-ends provide it). This lets flare build under a
Go reimplementation of Blade (blade-go) without changing the current build.

Also upgrade the vendored blade (thirdparty/blade/blade.zip + GITVERSION) to
blade-build master, which adds the `fail()` builtin the change above uses.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chen3feng chen3feng merged commit 3a5c410 into master Jul 2, 2026
10 checks passed
@chen3feng chen3feng deleted the starlark-compat-cc-flare-library branch July 2, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant