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

The caches are not all cleaned when deleting the local repository #312

Closed
gnodet opened this issue Jan 7, 2021 · 3 comments
Closed

The caches are not all cleaned when deleting the local repository #312

gnodet opened this issue Jan 7, 2021 · 3 comments
Assignees
Milestone

Comments

@gnodet
Copy link
Contributor

gnodet commented Jan 7, 2021

The following new test inside SingleModuleNativeIT test fails:

    @Test
    void buildDeleteRepoAndRebuild() throws IOException, InterruptedException {
        final Path localMavenRepo = parameters.mavenRepoLocal();
        TestUtils.deleteDir(localMavenRepo);

        final TestClientOutput o1 = new TestClientOutput();
        client.execute(o1, "clean", "install", "-e", "-B").assertSuccess();

        TestUtils.deleteDir(localMavenRepo);

        final TestClientOutput o2 = new TestClientOutput();
        client.execute(o2, "clean", "install", "-e", "-B").assertSuccess();
    }
@ppalaga
Copy link
Contributor

ppalaga commented Jan 7, 2021

Sounds like a duplicate of #26 - let's close that one.

@gnodet
Copy link
Contributor Author

gnodet commented Jan 11, 2021

The commit 67d5b4b might be a problem on OSX, as the WatchService on OSX uses polling, so file changes won't be detected if the repo is deleted and the launch started just after (the default polling interval is 10s on OSX).

However, even after fixing the problem, when the compilation failure happens, the repo has not been fully re-populated. This means the resolution of artefacts is cached somehow.

@gnodet
Copy link
Contributor Author

gnodet commented Jan 11, 2021

It seems the problem is the ProjectArtifactsCache default implementation. See #237

@gnodet gnodet closed this as completed in b10af9f Jan 13, 2021
gnodet added a commit that referenced this issue Jan 13, 2021
 #312

* The caches are not all cleaned when deleting the local repository, fixes #312
* Try to workaround file locking on windows
* Split the integration test
* Raise watch service sensitivity, add a delay in the test for windows to make sure the poll has been done
* Disable test on windows because all jar files are locked and the repository can't even be deleted
@gnodet gnodet self-assigned this Jan 14, 2021
@gnodet gnodet added this to the 0.4.0 milestone Jan 14, 2021
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

No branches or pull requests

2 participants