fix: ship the script tools/generate.sh sources - #44
Conversation
A clone of this repository cannot regenerate itself: ./tools/generate.sh: line 22: tools/lib/generate-common.sh: No such file or directory .gitignore carries the standard Python set, and its patterns are unanchored, so lib/ matches at any depth and swallowed tools/lib/. The file was never added, and nothing noticed because every local checkout already had it untracked. This is the one promise the whole design rests on: each SDK regenerates through its own tools/generate.sh, so any regeneration is reproducible from the SDK repository alone. It has not been true here since the directory was created, and 2.0.0 and 2.0.1 were both published from a tree that could not rebuild itself. Anchors lib/ and lib64/ to the root, where they were meant to apply, and adds the missing file. The other three SDKs track it already; only this repository carries the Python ignore set.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 020e6cf274
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| key = sys.argv[1].split(".") | ||
| doc = yaml.safe_load(open(".sdkgen.yaml")) | ||
| print(functools.reduce(operator.getitem, key, doc)) |
There was a problem hiding this comment.
Declare PyYAML before invoking the helper
On a clean checkout with only the dependencies declared in pyproject.toml or requirements.txt, yaml is unavailable, so every generation run exits with ModuleNotFoundError while reading .sdkgen.yaml before OpenAPI Generator can run. Add a documented/installable tooling dependency on PyYAML or parse the manifest without an undeclared package so the newly shipped script is actually runnable from a clone.
Useful? React with 👍 / 👎.
A clone of this repository cannot regenerate itself. From the pipeline:
.gitignorecarries the standard Python set, whose patterns are unanchored, solib/matches at any depth and swallowedtools/lib/. The file was never added, and nothing noticed because every local checkout already had it sitting there untracked.This is the promise the whole design rests on: each SDK regenerates through its own
tools/generate.sh, so a regeneration is reproducible from the SDK repository alone. It has not been true here since the directory was created, and 2.0.0 and 2.0.1 were both published from a tree that could not rebuild itself.lib/andlib64/to the repository root, where they were meant to apply.tools/lib/generate-common.sh.The other three SDKs track it already; only this repository carries the Python ignore set.