Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Handle base directory conflicts between targets #126

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

Duhemm
Copy link
Collaborator

@Duhemm Duhemm commented Aug 24, 2022

Previously, Fastpass would not take special considerations when 2 or
more targets shared the same base directory. Unfortunately, IntelliJ
currently does not allow multiple targets to share the same base
directory. As a result, some targets may end up being hidden, source
files may be associated with the wrong target, etc.

With this patch, Fastpass will try to rebase targets with conflicting
base directories where possible. To do so, Fastpass looks at the sources
of the targets, and if they share a common root that is not yet the base
directory of another target, then Fastpass will use that common root as
the new target's base directory.

When the conflict cannot be automatically resolved, Fastpass shows a
warning message.

Previously, Fastpass would not take special considerations when 2 or
more targets shared the same base directory. Unfortunately, IntelliJ
currently does not allow multiple targets to share the same base
directory. As a result, some targets may end up being hidden, source
files may be associated with the wrong target, etc.

With this patch, Fastpass will try to rebase targets with conflicting
base directories where possible. To do so, Fastpass looks at the sources
of the targets, and if they share a common root that is not yet the base
directory of another target, then Fastpass will use that common root as
the new target's base directory.

When the conflict cannot be automatically resolved, Fastpass shows a
warning message.
@Duhemm Duhemm requested a review from mikkoziel August 24, 2022 12:03
Copy link
Collaborator

@mikkoziel mikkoziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks

@Duhemm Duhemm merged commit 093b006 into scalameta:master Aug 29, 2022
@Duhemm Duhemm deleted the base-directory-deduplicate branch August 29, 2022 08:45
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.

2 participants