[Pitch] Allow overlapping sources if needed

Currently SPM does not allow overlapping sources. This feature somewhat protects against creating multiple targets with duplicated symbols. I argue that:

  1. Protecting against overlapping sources takes away a lot of flexibility and therefore hinders the adoption of SPM.
  2. It doesn't really protect anything, since it is still possible to create overlapping sources by using symlinks.

I think it should be possible to turn off this check by adding a flag in the Package class, or alternatively the whole overlapping sources check should be removed from SPM.

1 Like

I agree with your points here, I don't think that disallowing overlapping sources actually pulls its weight and we should stop doing that. I don't think we would need a flag to preserve the current behavior, but others might think otherwise.

2 Likes

I've found the current behavior incredibly frustrating at times, but also useful when I didn't actually intend to have overlapping sources and it was catching errors in my package definition. I don't know if it's worth having a flag, but I would probably use it if it was there.

1 Like

Agreed.

Terms of Service

Privacy Policy

Cookie Policy