FrancescoCastaldi commented on PR #39724: URL: https://github.com/apache/superset/pull/39724#issuecomment-5783602210
Hey @rusackas, thanks a lot for the thoughtful review and feedback! You are completely right: resolving the entry points directly from `package.json` and executing `node <entry.js>` directly with `shell=False` is a much cleaner architecture. It completely bypasses `cmd.exe`, rendering the entire Windows shell-parsing and `%VAR%` expansion bug class (including `%USERNAME%`) completely moot on all platforms. I have updated this PR in commit `3c5f91c0bf94` to fully adopt this exact approach: 1. **Direct `node <entry>` execution**: Both `po2json` and `oxfmt` entry points are resolved from their respective `package.json` `"bin"` fields and run directly via `node`. No batch/cmd wrappers or shells are ever involved. 2. **Windows path normalization**: Wrapped the resolved entry path with `os.path.normpath` so that forward slashes inside package manifests (e.g., `bin/po2json`) are cleanly normalized to standard platform separators, preventing mixed-slash mismatches on Windows. 3. **Single pipeline**: Retired `superset-frontend/scripts/po2json.sh` and updated `superset-frontend/package.json`'s `"build-translation"` script to point to `python3 ../scripts/translations/compile_po.py`. 4. **Streamlined**: Dropped the thread pool and auto-install logic to keep the script lean, simple, and deterministic. 5. **Tests & Linting**: Relocated the test file to `tests/unit_tests/scripts/translations/compile_po_test.py`. All 17 unit tests pass, and `ruff check` / `ruff format` pass cleanly. Since #39724 already has the full review history and is now aligned with this exact streamlined implementation, feel free to take a look and merge this PR directly (or let me know if you prefer to proceed otherwise). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
