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

Fix #1870: Rename ValueSupport subtypes for improved clarity #1872

Closed
wants to merge 2 commits into from

Conversation

juliohm
Copy link
Contributor

@juliohm juliohm commented Jun 15, 2024

This PR fixes #1870.

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.99%. Comparing base (b356da0) to head (fd4da93).

Files Patch % Lines
src/mixtures/mixturemodel.jl 66.66% 1 Missing ⚠️
src/truncated/normal.jl 83.33% 1 Missing ⚠️
src/univariate/discrete/negativebinomial.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1872   +/-   ##
=======================================
  Coverage   85.99%   85.99%           
=======================================
  Files         144      144           
  Lines        8666     8666           
=======================================
  Hits         7452     7452           
  Misses       1214     1214           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juliohm
Copy link
Contributor Author

juliohm commented Jun 15, 2024

Tests are failing on Julia nightly for unrelated reasons.

@devmotion
Copy link
Member

As mentioned in #1870, I'm not sure yet if it's worth to make this change.

@juliohm
Copy link
Contributor Author

juliohm commented Jun 15, 2024 via email

@devmotion
Copy link
Member

It's clearly a quite general term - but IMO that's not a problem per se. I think the existence of the same (exported) name in some other package is not a sufficient reason for such a major change in Distributions that probably also causes multiple deprecation warnings in downstream packages (in particular since it seems its use in Distributions predates the one in DataScienceTraits).

@juliohm
Copy link
Contributor Author

juliohm commented Jun 15, 2024 via email

@juliohm
Copy link
Contributor Author

juliohm commented Jun 18, 2024

@devmotion are you willing to unexport the Continuous and Discrete generic names? I can close this PR and open a new one if that is the case.

@devmotion
Copy link
Member

We can't unexport them in a non-breaking release and there are no plans for a breaking release in the near future.

@juliohm
Copy link
Contributor Author

juliohm commented Jun 19, 2024

there are no plans for a breaking release in the near future.

Because no one is actively leading progress in Distributions.jl or because there is a consensus among the active maintainers that breaking releases should only happen after months?

@devmotion
Copy link
Member

Because my impression is that downstream developers are annoyed by breaking releases of such a core part of the ecosystem (IIRC there are issues with complaints and last time we did one there were also not too many positive reactions on Slack), hence we try to minimize the number of breaking releases, and there's already a list of important points to change/improve in the next breaking release.

@juliohm
Copy link
Contributor Author

juliohm commented Jun 20, 2024

Because my impression is that downstream developers are annoyed by breaking releases of such a core part of the ecosystem (IIRC there are issues with complaints and last time we did one there were also not too many positive reactions on Slack), hence we try to minimize the number of breaking releases, and there's already a list of important points to change/improve in the next breaking release.

Isn't that always the case? Why shouldn't we fix the issue at hand in the next breaking release? It is breaking, and nothing is required downstream if we provide a deprecation warning, and document the breaking change properly.

Is there a plan somewhere of the next breaking release? Can you please share it?

@devmotion
Copy link
Member

Why shouldn't we fix the issue at hand in the next breaking release?

I'm not against changing it in the next breaking release (I still think that it's somewhat questionable to call it a fix) but I'm opposed to making a breaking release where this is the only (?) breaking change and all the breaking changes that have been discussed (more or less publicly) for a possible future breaking release are not addressed.

I also found the issue again that I had in mind: #1317

@juliohm
Copy link
Contributor Author

juliohm commented Jun 21, 2024

I'm opposed to making a breaking release where this is the only (?) breaking change

But I did not ask for that. What I want to know is which of the two PRs proposed is preferred for the next breaking release. This one (my preferred choice), or a new one that simply unexports the generic names?

@juliohm
Copy link
Contributor Author

juliohm commented Jul 5, 2024

@devmotion what is the preferred solution to this problem? What else can we do to help you with the downstream demands? I checked JuliaHub, and literally 0 open-source packages make use of Distributions.Continuous or Distributions.Discrete.

@mschauer
Copy link
Member

mschauer commented Jul 5, 2024

What is the current practice of this dichotomy? I don’t trust the docs very much, I assume it’s a mixture between the eltype of the samples and other notions of „support“ and „discrete“ and „continuous“

@juliohm
Copy link
Contributor Author

juliohm commented Jul 5, 2024

@mschauer I understand that it refers to the support of the CDF of the random variable. In any case, the exact meaning here shouldn't affect the issue at hand: the generic Continuous and Discrete names are exported and conflict with other modeling packages that use the words in the more general sense (e.g., continuous variable, not necessarily random).

@devmotion
Copy link
Member

what is the preferred solution to this problem?

My preferred solution at the time being is to not do anything - there doesn't seem to be an obvious bug to me, the names have been exported for a long time without issue, the problem can be avoided easily on the user side by only loading desired functionality (e.g., using using Distribution: ... or import Distributions), it's unclear how many users are actually affected by inconveniences because other packages started to export the same names, and probably a breaking change wouldn't make it into a new release in the near future anyway.

@juliohm juliohm closed this Jul 7, 2024
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

Successfully merging this pull request may close these issues.

Rename ValueSupport subtypes to more specific names
4 participants