Skip to content

Conversation

AripaStudio
Copy link

This pull request aims to address the issues reported in #312 and #311 by introducing a cleanup mechanism for stale library files before a new build. The primary goal is to prevent build conflicts that can arise from leftover files with .lib, .a, or .so extensions.

I have implemented a new function, cleanupLibraryFiles, in build.d which is called before the build process starts. This function checks for and removes any old library build artifacts in the target path, ensuring a clean and consistent build environment.

The changes were tested successfully using the following DUB project configuration, and no build errors were encountered:

{
    "name": "test-dub",
    "description": "test",
    "authors": ["khashayar"],
    "dependencies": {
    },
    "configurations": [
        {
            "name": "application",
            "targetType": "executable",
            "sourceFiles": [
                "source/app.d"
            ]
        },
        {
            "name": "library",
            "targetType": "library",
            "sourceFiles": [
                "source/test.d"
            ]
        }
    ]
}

Copy link

github-actions bot commented Aug 9, 2025

Thanks for your Pull Request and making D better!

This comment will automatically be updated to summarize some statistics in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant