Title: `PCBuild` needs an analog of `make regen-cases` · Issue #104055 · python/cpython · GitHub
Open Graph Title: `PCBuild` needs an analog of `make regen-cases` · Issue #104055 · python/cpython
X Title: `PCBuild` needs an analog of `make regen-cases` · Issue #104055 · python/cpython
Description: Feature or enhancement Windows developers need a way to invoke Tools/cases_generator/generate_cases.py with all necessary flags (and, probably, environment variables) skipping the challenge of manual typing. On non-Windows platforms it's...
Open Graph Description: Feature or enhancement Windows developers need a way to invoke Tools/cases_generator/generate_cases.py with all necessary flags (and, probably, environment variables) skipping the challenge of manu...
X Description: Feature or enhancement Windows developers need a way to invoke Tools/cases_generator/generate_cases.py with all necessary flags (and, probably, environment variables) skipping the challenge of manu...
Opengraph URL: https://github.com/python/cpython/issues/104055
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`PCBuild` needs an analog of `make regen-cases`","articleBody":"# Feature or enhancement\r\n\r\nWindows developers need a way to invoke `Tools/cases_generator/generate_cases.py` with all necessary flags (and, probably, environment variables) skipping the challenge of manual typing.\r\n\r\nOn non-Windows platforms it's achieved with `make regen-all` that depends on the `regen-cases` target: https://github.com/python/cpython/blob/a679c3d58d10aafd9ac9355fdd16151607e37d65/Makefile.pre.in#L1490-L1503\r\n\r\nBy analogy, `PCBuild\\regen.targets` could do the same for MSBuild.\r\n\r\n# Pitch\r\n\r\nWhen I tried to resolve a `Python/generated_cases.c.h` conflict in gh-103976, I found out that I cannot do it easily. An attempt to port the `regen-cases` target was unsuccessfull:\r\n\r\n\u003cpre\u003e\r\n\u003cb\u003eD:\\Oleg\\cpython\u003eset PYTHONPATH=D:\\Oleg\\cpython\\Tools\\cases_generator\u003c/b\u003e\r\n\r\n\u003cb\u003eD:\\Oleg\\cpython\u003epython Tools/cases_generator/generate_cases.py --emit-line-directives Python/generated_cases.c.h.new Python/opcode_metadata.h.new\u003c/b\u003e\r\nRunning Release|x64 interpreter...\r\nTraceback (most recent call last):\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 1259, in \u003cmodule\u003e\r\n main()\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 1250, in main\r\n a.parse() # Raises SyntaxError on failure\r\n ^^^^^^^^^\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 557, in parse\r\n self.parse_file(filename, instrs_idx)\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 568, in parse_file\r\n with open(filename) as file:\r\n ^^^^^^^^^^^^^^\r\nFileNotFoundError: [Errno 2] No such file or directory: 'Python/generated_cases.c.h.new'\r\n\r\n\u003cb\u003eD:\\Oleg\\cpython\u003epython Tools/cases_generator/generate_cases.py --emit-line-directives Python/generated_cases.c.h Python/opcode_metadata.h\u003c/b\u003e\r\nRunning Release|x64 interpreter...\r\nTraceback (most recent call last):\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 1259, in \u003cmodule\u003e\r\n main()\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 1250, in main\r\n a.parse() # Raises SyntaxError on failure\r\n ^^^^^^^^^\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 557, in parse\r\n self.parse_file(filename, instrs_idx)\r\n File \"D:\\Oleg\\cpython\\Tools\\cases_generator\\generate_cases.py\", line 583, in parse_file\r\n raise psr.make_syntax_error(\r\n File \"Python/generated_cases.c.h\", line 4658\r\n }\r\n ^\r\nSyntaxError: Couldn't find '// BEGIN BYTECODES //' in Python/generated_cases.c.h\r\n\u003c/pre\u003e\r\n\r\nAutogenegeration would lift off a need to write a private batch-file, debug it, and use it each time `Python/bytecodes.c` is touched.\r\n\r\n# Your environment\r\n\r\n\u003c!-- Include as many relevant details as possible about the environment you experienced the bug in --\u003e\r\n\r\n- CPython versions tested on: `Python 3.12.0a7+ (heads/main:5078eedc5b, May 1 2023, 23:20:56) [MSC v.1929 64 bit (AMD64)] on win32`","author":{"url":"https://github.com/arhadthedev","@type":"Person","name":"arhadthedev"},"datePublished":"2023-05-01T19:27:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/104055/cpython/issues/104055"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4c907213-d381-31d9-4375-f5c52d5b4cd8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CC4:9124A:1ED7C01:28223F4:696B3FF8 |
| html-safe-nonce | 058b56b16406089f68287a6bac3c8da88a074b25ef6e290bc5dcfc774c8052e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0M0OjkxMjRBOjFFRDdDMDE6MjgyMjNGNDo2OTZCM0ZGOCIsInZpc2l0b3JfaWQiOiIxNTEwOTYxMDU2ODkwNjk5NzY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | febb30b827bad87ada3d077347ba9b95a38990cc82b20c0c48ac9daafdc9e472 |
| hovercard-subject-tag | issue:1691248216 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/104055/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8e913c46b16f3ccbc0da4f3d813bd43eea436ae2c355d51a0c32aa6359723ae/python/cpython/issues/104055 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8e913c46b16f3ccbc0da4f3d813bd43eea436ae2c355d51a0c32aa6359723ae/python/cpython/issues/104055 |
| og:image:alt | Feature or enhancement Windows developers need a way to invoke Tools/cases_generator/generate_cases.py with all necessary flags (and, probably, environment variables) skipping the challenge of manu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arhadthedev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width