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

compat: no MmapIO for windows 7 #509

Merged
merged 5 commits into from
Dec 19, 2023
Merged

Conversation

HongBinYu-hub
Copy link
Contributor

Ensure win7 can be precompiled
Win7 and below systems use IOStream method to ensure pre-compilation correct.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a0d0730) 85.94% compared to head (499c1f0) 85.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #509      +/-   ##
==========================================
- Coverage   85.94%   85.92%   -0.03%     
==========================================
  Files          31       31              
  Lines        4213     4213              
==========================================
- Hits         3621     3620       -1     
- Misses        592      593       +1     

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

@johnnychen94
Copy link
Member

johnnychen94 commented Dec 11, 2023

I really think you should change the default value for iotype (everywhere) to be DEFAULT_IO_TYPE, where

# Windows 7 doesn't support mmap, falls back to IOStream
const DEFAULT_IO_TYPE = if is_win7()
    IOStream
else
    MmapIO
end

is_win7() = Sys.iswindows() && Sys.windows_version().major <= 6 && Sys.windows_version().minor <= 1

The current version doesn't really fix anything: what makes the default and most commonly used jldopen usages broken is still broken.

@johnnychen94
Copy link
Member

@JonasIsensee Are you okay with this compatibility patch? For some reason, we (Suzhou Tongyuan) need to keep compatibility with some "strange" platforms, e.g., windows 7.
We prefer to contribute upstream first, so here's the patch.

If you don't want to get this patch in, we understand, and we'll instead start to maintain our internal fork version.

@johnnychen94 johnnychen94 changed the title Ensure win7 can be precompiled compat: no MmapIO for windows 7 Dec 12, 2023
src/JLD2.jl Outdated
const DEFAULT_IOTYPE = if is_win7()
IOStream
else
JLD2.MmapIO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be

Suggested change
JLD2.MmapIO
MmapIO

@JonasIsensee
Copy link
Collaborator

@JonasIsensee Are you okay with this compatibility patch? For some reason, we (Suzhou Tongyuan) need to keep compatibility with some "strange" platforms, e.g., windows 7. We prefer to contribute upstream first, so here's the patch.

If you don't want to get this patch in, we understand, and we'll instead start to maintain our internal fork version.

I apologize for the late reply..
I like this approach:
const DEFAULT_IO_TYPE = if is_win7()

@JonasIsensee JonasIsensee merged commit 037a9d3 into JuliaIO:master Dec 19, 2023
9 of 14 checks passed
@johnnychen94
Copy link
Member

Thanks for merging!

I'll use my privilege to make a patch release #514

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.

3 participants