Navigation Menu

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

Make sourcePaths work as documented #2041

Closed
wants to merge 1 commit into from

Conversation

omerfirmak
Copy link
Contributor

sourcePaths is only default initialized when both
top level and configuration level sourcePaths is empty.

Fixes #1913

@dlang-bot
Copy link
Collaborator

Thanks for your pull request and interest in making D better, @omerfirmak! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

@omerfirmak
Copy link
Contributor Author

Apparently, some projects in buildkite relied on the old behavior.

`sourcePaths` is only default initialized when both
top level and configuration level `sourcePaths` is empty.

Fixes dlang#1913
@Geod24
Copy link
Member

Geod24 commented Dec 7, 2020

Apparently, some projects in buildkite relied on the old behavior.

Probably most people that use this will implicitly depend on this behavior.
@atilaneves what do you make of this change / issue ?

@atilaneves
Copy link
Contributor

I think that, unfortunately, breaking projects that relied on the old behaviour is a no-no. As I mentioned in the issue itself, putting both apps in, say, foo/app1 and foo/app2 instead of in a top-level source directory seems to sidestep this issue.

@Geod24
Copy link
Member

Geod24 commented Dec 9, 2020

I think that, unfortunately, breaking projects that relied on the old behaviour is a no-no.

Yeah, that's a given.

As I mentioned in the issue itself, putting both apps in, say, foo/app1 and foo/app2 instead of in a top-level source directory seems to sidestep this issue.

The question was more about whether you considered it a valid issue as well, being a user of the current behavior.
Just so there isn't one single person (me) providing feedback. If that's something you agree on, then we can talk about deprecating this behavior, by asking people to add source in their configurations as well.

@atilaneves
Copy link
Contributor

If it didn't break any projects I'd say ok, but it does, so...

@rikkimax
Copy link
Contributor

There are enough issues with dub doing things that people don't expect that this should be fixed.

But @atilaneves is right, it could break projects.

So how about a big honking warning (for projects it will break) for a couple of years and not make it go live until then?

@PetarKirov
Copy link
Member

I guess the simplest way to resolve matters like this is by adding a settings.json option to revert to the old behavior that would be available for a deprecation period of 2 years and could be enabled by default for next 3 releases or something like that.

@s-ludwig
Copy link
Member

I guess the simplest way to resolve matters like this is by adding a settings.json option to revert to the old behavior that would be available for a deprecation period of 2 years and could be enabled by default for next 3 releases or something like that.

A global setting won't cut it, as it may need to be set in some packages, but must not be set in others. But adding a deprecation warning (along with mitigation instructions) would be a good idea in any case. We could also add that setting to the package recipe to allow silencing the warning by forcing the new behavior.

@omerfirmak omerfirmak closed this Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sourcePaths does not work as documented with configurations
7 participants