-
Notifications
You must be signed in to change notification settings - Fork 49
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
More robust configuration of unmanagedSourceDirectories
#659
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I can test out a snapshot later if we want to be more safe that it works. Though it seems like we are changing the way the paths themselves are being constructed a bit, is that a problem cross-OS?
CI passed on Windows and it exercises this code. So must be working? |
Ok! :) |
Test reveals that indeed, EDIT: actually, it's |
Can confirm by introspecting our own build.
|
So the hack part of this, where I think it's breaking down, is that our configuration must run last after all the other source directories are configured. I don't think that's happening right now and I'm not really sure if we can guarantee that in general anyway. This approach may be bust. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs to fix for the cross-target folders
Previously, we were forgetting to configure
scala-2.13+
andscala-2.12-
for the non-shared
directories ofCrossProject
s. h/t @j-mie6 for reporting.So in this PR I'm trying a strategy that is a lot dumber but simpler to implement and more robust to unusual setups. It simply looks for all the source directories that end in
/scala
and adds/scala-{2.12-,2.13+}
variants of them.Notably, we no longer need to know about
CrossProject
s at all.Please somebody tell me this is a bad idea 😂 it feels just a little bit too hacked. But I honestly cannot think of a better way to do this, esp. when there is also the explosion of
jvm-native
style shared directories that also need to be considered ...This PR also turns the
settings
plugin into aCrossProject
so we can properly dogfood the changes.