Skip to content

Conversation

NicolasT
Copy link
Contributor

In some functions, a combination of throwErrnoIf* and modifyIOError/ioeSetFileName was used, even though throwErrnoPathIf* helpers are available.

This patch cleans up such code, unifying the use of the throwErrnoPathIf* helpers.

@NicolasT
Copy link
Contributor Author

CirrusCI fails during setup with

cabal update
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/bin/cabal not found

I'd be quite surprised this is caused by this patch though 😄

@hasufell
Copy link
Member

I don't even know what CirrusCI is.

@hasufell
Copy link
Member

@Bodigrim

@NicolasT
Copy link
Contributor Author

WASI build fails because mknod and mkstemp aren't defined (I'm not a WASM expert, but no mknod seems to make sense?). Not sure, however, how previous builds succeeded and this one doesn't, unless there've been changes to the WASI headers upstream, and we're not using pinned versions of dependencies, or something along those lines.

@NicolasT
Copy link
Contributor Author

I don't even know what CirrusCI is.

A CI environment running the tests on FreeBSD, from what I could gather.

@Bodigrim
Copy link
Contributor

@TerrorJack could you please look at wasm build failures?

@NicolasT
Copy link
Contributor Author

I'll rebase once #246 is merged (which likely requires a fix for the WASI builds first, so rebase should fix that as well).

@NicolasT
Copy link
Contributor Author

(I'm working on a fix for the WASI build. Not sure how it could succeed in the past, though.)

NicolasT added a commit to NicolasT/unix that referenced this pull request Sep 10, 2022
The `System.Posix.Files.PosixString` and `System.Posix.Temp.PosixString`
modules failed to build on the WASI/WASM platform because foreign
imports of `mkstemp` and `mknod` was not conditional on `configure`
findings.

This patch aligns these modules with their non-`PosixString`
counterparts.

See: haskell#245
See: https://github.com/haskell/unix/runs/8284652815?check_suite_focus=true
@NicolasT NicolasT mentioned this pull request Sep 10, 2022
@NicolasT
Copy link
Contributor Author

@TerrorJack could you please look at wasm build failures?

@TerrorJack, make sure to see #247 before jumping on this and potentially wasting valuable time 😉

@TerrorJack
Copy link
Contributor

Thanks for the fix @NicolasT! @Bodigrim, I've approved #247 which fixes the build. Ping me if any further wasm32-wasi fix would be required.

Bodigrim pushed a commit that referenced this pull request Sep 11, 2022
The `System.Posix.Files.PosixString` and `System.Posix.Temp.PosixString`
modules failed to build on the WASI/WASM platform because foreign
imports of `mkstemp` and `mknod` was not conditional on `configure`
findings.

This patch aligns these modules with their non-`PosixString`
counterparts.

See: #245
See: https://github.com/haskell/unix/runs/8284652815?check_suite_focus=true
In some functions, a combination of `throwErrnoIf*` and
`modifyIOError`/`ioeSetFileName` was used, even though
`throwErrnoPathIf*` helpers are available.

This patch cleans up such code, unifying the use of the
`throwErrnoPathIf*` helpers.
@Bodigrim Bodigrim merged commit b085646 into haskell:master Sep 11, 2022
@Bodigrim
Copy link
Contributor

Thanks @NicolasT!

@NicolasT NicolasT deleted the throw-with-path branch September 11, 2022 22:08
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.

4 participants