-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Effort - LowEffort - LowEffort - LowFrequency - EveryTimeFrequency - EveryTimeFrequency - EveryTimePriority - LaterPriority - LaterPriority - LaterReach - SomeReach - SomeReach - SomeSeverity - S3Severity - S3Severity - S3bugbugbugcommunitycommunitycommunity
Description
Describe the bug
The build_and_copy_rust_modules function in the setup script does not properly loop through the module directory. The filter function is a generator and is executed on the fly, so since directory changes occur inside the loop the os.path.isdir(f) part of the loop breaks.
To Reproduce
Steps to reproduce the behavior:
- Add a new rust module in the
rustdirectory that falls after therust_examplemodule alphabetically - Build and run the docker image
- Shell into the running docker container
- Execute the setup script with
python3 setup build --lang rust -p /usr/lib/memgraph/query_modules - Observe that the new package is not built and copied to
query_modules
Expected behavior
It's expected that all rust modules in the directory are built and copied to the output path except for rsmgp-sys.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This can be fixed by changing the for loop in the build_and_copy_rust_modules function to the following:
for project in filter(
lambda f: os.path.isdir(os.path.join(RS_DIRECTORY, f)) and f != "rsmgp-sys",
os.listdir(RS_DIRECTORY),
)Metadata
Metadata
Assignees
Labels
Effort - LowEffort - LowEffort - LowFrequency - EveryTimeFrequency - EveryTimeFrequency - EveryTimePriority - LaterPriority - LaterPriority - LaterReach - SomeReach - SomeReach - SomeSeverity - S3Severity - S3Severity - S3bugbugbugcommunitycommunitycommunity
Type
Projects
Status
In Review