timholy / FlameGraphs.jl

Analysis of profiling data using trees
MIT License
51 stars 12 forks source link

Remove hard dependency on FileIO.jl #67

Open kimikage opened 4 months ago

kimikage commented 4 months ago

This is in preparation for issue #65. Unlike Colors.jl, I believe it is possible to remove the hard dependency on FilesIO.jl in a compatible manner, i.e. in FlameGraphs.jl v1. This is because FilesIO must be loaded in order to use File{format "JLPROF"}.

For compatibility this depends on Requires.jl instead. However, it had already been in the dependencies indirectly via FileIO.jl.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.73%. Comparing base (65f57bc) to head (a761561). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #67 +/- ## ========================================== + Coverage 94.91% 95.73% +0.81% ========================================== Files 5 6 +1 Lines 354 375 +21 ========================================== + Hits 336 359 +23 + Misses 18 16 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timholy commented 1 month ago

Would you be OK with waiting for a release that contains your other fixes, and then we make a 1.1.0 release that makes Julia 1.10 (the future LTS) the minimum Julia version? That way we wouldn't need Requires.jl.

EDIT: actually, it looks like all the changes since the last release are invisible to users. So we could just do this now, I think. Unless you really need to decouple FileIO for older versions of Julia?

kimikage commented 1 month ago

My main aim is to decouple Colors.jl and I do not have a strong necessity for this PR itself. So, I have no strong objection to bumping up the minimum version of Julia to v1.10.

However, I personally do not like the idea of changing the lower bounds of the compat entries within a single major version. Of course, this is a matter of "philosophy", not one that takes precedence over the practical issue of maintenance costs.

Since the usage of Requires.jl is idiomatic, I don't think the maintenance cost is too high. In other words, it seems to me that the bumping could be done within FlameGraphs.jl v2.0.

One concern is that the decoupling of Colors.jl will take a bit of work, i.e., the v2.0 release might not be likely anytime soon.

timholy commented 1 month ago

For packages that are at least 1.x.x (i.e., "full semver"), the policy in General is that you can't bump the Julia [compat] bound without a new minor release. That's intended to leave room for bugfixes that apply to older Julia versions. Since a minor bump is for new features, I personally think it's OK if newer features only apply to the Julia versions you want to support. But I'm also fine with the Requires version.

Feel free to merge when you feel ready.