Skip to content

refactor: use execpath in genrule commands - #835

Merged
AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/execpath-in-genrules
Sep 16, 2026
Merged

AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/execpath-in-genrules

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

In these genrules, $(location ...) resolves to the same paths as $(execpath ...), so this is a behavior-preserving cleanup. location is a legacy, context-dependent path expansion; using execpath makes it explicit that these commands need paths usable by the build action.

What changed

  • Replaced $(location ...) with $(execpath ...) in genrules that copy Needs outputs, generate metamodel documentation, and create generated documentation fixture files.
  • Added comments explaining the shell commands and path/output substitutions.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-835: https://eclipse-score.github.io/docs-as-code/pr-835/

# Run the generator on the YAML input and tell it where to write the RST
# and Mermaid files. Bazel expands each $(execpath ...) to the named tool
# or file's path in this build action, so the command can find them.
cmd = "$(execpath :generate_metamodel_rst_bin) --rst-output $(execpath generated/index.rst) --mmd-output $(execpath generated/metamodel_classes.mmd) $(execpath //src/extensions/score_metamodel:metamodel_yaml)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if the last one should be also @score_docs_as_code or if this doesn't matter here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to work 😆

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one comment but we can address that if its ap roblem in a future PR

@AlexanderLanin
AlexanderLanin merged commit b696ac8 into eclipse-score:main Sep 16, 2026
20 checks passed
@AlexanderLanin
AlexanderLanin deleted the refactor/execpath-in-genrules branch September 16, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants