Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-allow localisation when SOURCE_DATE_EPOCH is set (follow-up to #10949) #11303

Conversation

jayaddison
Copy link
Contributor

@jayaddison jayaddison commented Apr 8, 2023

Feature or Bugfix

  • Bugfix

Purpose

Detail

  • Disable localisation when SOURCE_DATE_EPOCH is set #10949 fixed an unusual behaviour around lazy-loading of localised resources
    • During investigation, it turned out that many gettext-localized values -- particularly in Python modules under sphinx.domains -- were being translated at module-load-time (in other words, when each Python module was import'ed) -- and would not subsequently be re-localized.

  • However, Disable localisation when SOURCE_DATE_EPOCH is set #10949 also completely disabled localisation during reproducible builds (detected by a non-empty SOURCE_DATE_EPOCH environment variable)
  • Disabling localisation may not have been necessary: as mentioned in the original bug description, the objects.inv file -- where reproducibility problems were occurring -- was already being requested in a single language (English-only); so localisation of the rest of the package-under-build should be irrelevant

Relates

@jayaddison
Copy link
Contributor Author

Sorry @AA-Turner @lamby; I don't currently feel confident that #10949 was the correct fix -- and nor am I confident that this patch makes it correct.

I'm going to revert #10949 completely until I can confirm repro and fix of the originally-reported issue. Maybe these changes do resolve the problem, but for a large widely-used project, I think that a 'first, do no harm' principle makes sense.

@jayaddison jayaddison closed this Apr 9, 2023
@jayaddison
Copy link
Contributor Author

Revert opened as #11306.

@jayaddison jayaddison deleted the issue-9778/restore-reproducible-build-translation branch April 9, 2023 17:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant