Skip to content

Get or set the file caching mode - #340

Merged
Bodigrim merged 5 commits into
haskell:masterfrom
jorisdral:jdral/issue-322
May 6, 2025
Merged

Bodigrim merged 5 commits into
haskell:masterfrom
jorisdral:jdral/issue-322

Conversation

@jorisdral

Copy link
Copy Markdown
Contributor

Resolves #322

Comment thread System/Posix/Fcntl.hsc Outdated
@hasufell
hasufell requested a review from Bodigrim April 29, 2025 12:29
@hasufell

Copy link
Copy Markdown
Member

We need to restore the github workflows to see if JS/wasm backends function. If you don't want to do that, I'll do it later this week.

Comment thread System/Posix/Fcntl.hsc Outdated
-- Throws 'IOError' (\"unsupported operation\") if platform does not support
-- reading the cache mode.
--
-- (use @#if HAVE_O_DIRECT@ CPP guard to detect availability).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this macro available to a user though?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be through HsUnix.h

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd prefer the documentation to say so explicitly, otherwise people will be left wondering who defines them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've now added a hint to use #include "HsUnix.h" to bring the macros into scope

Comment thread System/Posix/Fcntl.hsc
@hasufell

Copy link
Copy Markdown
Member

Can you rebase against master?

@jorisdral

Copy link
Copy Markdown
Contributor Author

Can you rebase against master?

Will do

Comment thread System/Posix/Fcntl.hsc Outdated
Comment thread System/Posix/Fcntl.hsc
@jorisdral

Copy link
Copy Markdown
Contributor Author

All CI jobs except OpenBSD seem to pass (seems like a problem with the job/runner, not the code?). I can squash the commits into one if the changes are okay to merge

@hasufell
hasufell requested a review from Bodigrim April 30, 2025 14:13
Comment thread System/Posix/Fcntl.hsc Outdated
@jorisdral
jorisdral requested a review from Bodigrim May 6, 2025 09:20
@Bodigrim
Bodigrim merged commit d299211 into haskell:master May 6, 2025
@Bodigrim

Bodigrim commented May 6, 2025

Copy link
Copy Markdown
Contributor

Thanks!

@jorisdral
jorisdral deleted the jdral/issue-322 branch May 7, 2025 08:49
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.

Add portable support for file open with data caching supressed/eliminated.

3 participants