Skip to content

Revert "add Printf support (#201)"#207

Merged
dlfivefifty merged 2 commits intoJuliaMath:masterfrom
bvdmitri:revert-printf
Nov 19, 2025
Merged

Revert "add Printf support (#201)"#207
dlfivefifty merged 2 commits intoJuliaMath:masterfrom
bvdmitri:revert-printf

Conversation

@bvdmitri
Copy link
Contributor

This reverts commit 450defe.

Fixes #206

This change is pretty disruptive and makes many packages fail in 1.10 due to circular dependencies. This is oke to revert until a better solution is in place.

@bvdmitri
Copy link
Contributor Author

Another reason to revert this code is that it depends on private internals of Printf which are not meant to be extended

julia> using Printf

help?> Printf.fmt
  │ Warning
  │
  │  The following bindings may be internal; they may change or be
  │  removed in future versions:
  │
  │    •  Printf.fmt

  No documentation found for private symbol.

  Printf.fmt is a Function.

help?> Printf.plength
  │ Warning
  │
  │  The following bindings may be internal; they may change or be
  │  removed in future versions:
  │
  │    •  Printf.plength

  No documentation found for private symbol.

  Printf.plength is a Function.

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.12%. Comparing base (13c76e1) to head (381bbb3).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   99.11%   98.12%   -0.99%     
==========================================
  Files           6        6              
  Lines         225      267      +42     
==========================================
+ Hits          223      262      +39     
- Misses          2        5       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aplavin
Copy link
Contributor

aplavin commented Nov 14, 2025

Agree with the revert of course, as stated in the issue. Just note that

Another reason to revert this code is that it depends on private internals

is not the common practice in Julia. A lot of very popular packages depend on internals or overload them. Arguably, the majority?

@dlfivefifty
Copy link
Member

A lot of very popular packages depend on internals or overload them. Arguably, the majority?

Mine definitely do! Possibly to an extreme extent.

I think the old-school OOP strict private/public interface is not as important as it used to be because one has the possibility of downstream tests to pick up packages breaking due to changed internals.

@bvdmitri
Copy link
Contributor Author

Bump, can we merge this and tag a new release?

@dlfivefifty
Copy link
Member

if you want this tagged can you bump the version?

@aplavin
Copy link
Contributor

aplavin commented Nov 18, 2025

The plan is to make it v0.8, right?

@dlfivefifty
Copy link
Member

No make it a patch version: it’s more like a bug fix

@aplavin
Copy link
Contributor

aplavin commented Nov 18, 2025

It's unambiguous removal of existing functionality in a patch version then...

@dlfivefifty
Copy link
Member

As we already discussed: in this case we are fixing a problem so it makes sense to bend the rules of semvar.

Though the alternative is to yank the previous tag. So if you are not happy with a patch version why don't you just make a PR Into registry deleting the tag?

@bvdmitri
Copy link
Contributor Author

bvdmitri commented Nov 19, 2025

I bumped the version to 0.7.13. This PR doesn't remove any functionality of the package, only some custom pretty-printing when other package happens to be loaded. The version 0.7.12 doesn't have any new functionality because this version simply doesn't work as intended and breaks workflows of many people that don't even use Printf. There is no good reason to make it 0.8 and leave 0.7.* in a broken state forever.

@bvdmitri
Copy link
Contributor Author

@aplavin you're welcome to re-implement the Printf functionality in a separate PR in a way that works nicely on Julia LTS and above. Until then, I don't think its useful to argue and bringning some semver behaviour where many people experience problems with their workflows. You had 5 days to make a new PR which you think would be better than this one, something has to be done and if we don't have anything better than this PR lets merge it and you will have more time thinking of a better solution and restores the behaviour that you want

@dlfivefifty
Copy link
Member

I doubt the nightly failures are related. Let's merge and tag?

@aplavin
Copy link
Contributor

aplavin commented Nov 19, 2025

This PR doesn't remove any functionality of the package, only some custom pretty-printing when other package happens to be loaded.

False: the removed tests work on the previous version, but error (don't just return a slightly different "pretty printing") on the new one.
You logic seems to be that package extensions aren't covered by semver. That's... a pretty unusual pov to be honest.

The version 0.7.12 doesn't have any new functionality because this version simply doesn't work as intended and breaks workflows of many people that don't even use Printf.

The version 0.7.12 clearly has new functionality, as evidenced by the tests you removed: they work on 0.7.12, but error on the new one.
The fact that the new functionality happens to uncover a less-known bug in Julia doesn't mean "doesn't have any new functionality", that's very twisted logic.

@aplavin
Copy link
Contributor

aplavin commented Nov 19, 2025

@aplavin you're welcome to re-implement the Printf functionality in a separate PR in a way that works nicely on Julia LTS and above. Until then, I don't think its useful to argue and bringning some semver behaviour where many people experience problems with their workflows. You had 5 days to make a new PR which you think would be better than this one, something has to be done and if we don't have anything better than this PR lets merge it and you will have more time thinking of a better solution and restores the behaviour that you want

Me (same as many others) are not affected by this Julia bug at all, and naturally had little motivation to do this.
Note that the "default" assumption in Julia is that packages follow the versioning pattern of packages keeping backwards compatibility between patch versions.

But anyway, the decision on what to release is always up to maintainers – I'm just giving my opinion here.

@dlfivefifty dlfivefifty merged commit fb82452 into JuliaMath:master Nov 19, 2025
9 of 13 checks passed
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.

"Warning: Circular dependency detected." with IntervalSets 0.7.12 in Julia 1.10.10

3 participants