thirdparty: make foreign_build.bld Starlark-parseable#212
Merged
Conversation
blade-go's front-end is Starlark, which (unlike Python) has no generator expressions or implicit string concatenation. Convert foreign_build.bld to the equivalent Starlark forms so it can be include()'d there, with no behavior change under Python Blade: - generator expr -> list comprehension in the rpath ' '.join(...). - adjacent-string-literal concatenation -> explicit '+' in dyld_path, the autotools configure command, and the cmake generate command (parenthesized so the trailing `% (...)` still applies to the whole concatenation). - fix cmake_cc_library, which was dead-but-unparseable: it referenced undefined package_name/deps/with_packages. Give it deps/with_packages params, pass package_name=name and source_package through (mirrors autotools_cc_library). Same Starlark-compat class as the cc_flare_library change in the build_rules.bld. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
blade-go's front-end is Starlark, which (unlike Python) has no generator expressions or implicit string concatenation. Convert
foreign_build.bldto equivalent Starlark forms so it can beinclude()'d there — no behavior change under Python Blade:' '.join(...).+indyld_path, the autotoolsconfigurecommand, and the cmake generate command (parenthesized so the trailing% (...)still applies to the whole concatenation).cmake_cc_library, which was dead-but-unparseable (referenced undefinedpackage_name/deps/with_packages): give itdeps/with_packagesparams, passpackage_name=nameandsource_packagethrough — mirrorsautotools_cc_library.Same Starlark-compat class as the
cc_flare_librarychange inbuild_rules.bld(#211).