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

Fix message package __init__.py symlink overwrite #287

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

patkenneally
Copy link
Collaborator

Description

The generateMessagepackageInit.py is updated to overwrite the __init__.py file on each build. To achieve this a custom symlink function is added which overwrites the existing symlink and prevents race conditions.

Verification

The build was tested by invalidating the build cache to force the build to rerun. The __init__.py was correctly regenerated.

Documentation

None new, none invalidated.

Future work

There were a lot of potential refactors that could have hitched their wagon to this PR. However, given the substantial message system redesign coming, many of those refactors will be made redundant.

@patkenneally patkenneally self-assigned this Jul 23, 2024
@patkenneally patkenneally force-pushed the feature/allow-build-module-symlink-overwrite branch 2 times, most recently from 3e4f692 to c9fc506 Compare July 23, 2024 21:17
@patkenneally patkenneally changed the title Fix allow build module symlink overwrite Fix message package __init__.py symlink overwrite Jul 23, 2024
@patkenneally patkenneally force-pushed the feature/allow-build-module-symlink-overwrite branch 2 times, most recently from b90349a to 81f869e Compare July 25, 2024 21:24
The conditional is redundant because the exist_ok=True is being passed
which recreates the directory even if it exists. Recreating it is inline with
the rationale that the directory, the __init__ file and its contents should be
recreated each build, rather than requiring a -clean which is a much more
significant erasure of cached build files.
@patkenneally patkenneally force-pushed the feature/allow-build-module-symlink-overwrite branch from 81f869e to 0af142d Compare July 25, 2024 21:31
@patkenneally patkenneally merged commit 3b7cf5b into develop Jul 25, 2024
3 checks passed
@patkenneally patkenneally deleted the feature/allow-build-module-symlink-overwrite branch July 25, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants