Skip to content

Add PosixFilePath and friends support (for AFPP)#202

Merged
Bodigrim merged 2 commits into
haskell:masterfrom
hasufell:AFPP
Jul 17, 2022
Merged

Add PosixFilePath and friends support (for AFPP)#202
Bodigrim merged 2 commits into
haskell:masterfrom
hasufell:AFPP

Conversation

@hasufell

@hasufell hasufell commented Mar 22, 2022

Copy link
Copy Markdown
Member

Depends on: haskell/filepath#103

For testing simple file operations, you can use https://github.com/hasufell/file-io (also please review the posix module)

@Bodigrim

@hasufell hasufell mentioned this pull request Mar 22, 2022
9 tasks
Comment thread cabal.project Outdated
source-repository-package
type: git
location: https://github.com/hasufell/filepath.git
tag: babf4068bd7e3c84b87033ed12542a34efa6a462

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

temporary

@hasufell hasufell marked this pull request as draft March 22, 2022 20:54
@hasufell hasufell marked this pull request as ready for review March 22, 2022 21:04
@hasufell hasufell force-pushed the AFPP branch 4 times, most recently from b7f1a64 to 2a96025 Compare March 24, 2022 19:44
@Bodigrim

Copy link
Copy Markdown
Contributor

@hasufell could you please rebase?

Comment thread unix.cabal Outdated
@hasufell hasufell force-pushed the AFPP branch 2 times, most recently from c98b694 to 4d7bce9 Compare May 1, 2022 07:48
@hasufell

hasufell commented May 1, 2022

Copy link
Copy Markdown
Member Author

ping

@hasufell hasufell force-pushed the AFPP branch 3 times, most recently from 76b3442 to c0fd56c Compare May 1, 2022 17:18

@hs-viktor hs-viktor left a comment

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.

Looks fine with minor nits. Please address those you don't object to, and rebase...

Comment thread System/Posix/IO/PosixString.hsc Outdated
Comment thread System/Posix/PosixString.hs
Comment thread cabal.project
@Bodigrim

Bodigrim commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

@hasufell could you please rebase?

@hasufell

hasufell commented Jun 2, 2022

Copy link
Copy Markdown
Member Author

@hasufell could you please rebase?

done

@vdukhovni

Copy link
Copy Markdown
Contributor

Now that we have CI for "wasm", it is no longer in the way of routine work by wasm-agnostic maintainers. :-(
What's to be done about this? Can the wasm CI be enabled only on wasm branches? Or otherwise not get in the way?

@Bodigrim

Bodigrim commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

I’m AFK, but either Wasm CI job should honor settings in cabal.project, or filepath released officially. @vdukhovni are you happy with this branch otherwise?

@hasufell hasufell force-pushed the AFPP branch 2 times, most recently from 567811d to c7c32da Compare June 2, 2022 20:58
@hs-viktor

Copy link
Copy Markdown
Contributor

The ARM CI isn't working yet, and I should look a bit more carefully at the new Posix-flavoured Terminal.hsc.

@Bodigrim

Copy link
Copy Markdown
Contributor

@TerrorJack ci-wasm32-wasi job does not seem to work any longer. Could you please take a look?

@TerrorJack

Copy link
Copy Markdown
Contributor

Sure I'll open a PR against master to fix the job.

@TerrorJack

Copy link
Copy Markdown
Contributor

@Bodigrim It should work now if you restart the job; I looked into it, and it seems to be a transient network failure; I added retry logic to the curl scripts.

@hasufell

Copy link
Copy Markdown
Member Author

Not due to a network failure: https://github.com/haskell/unix/runs/7280567595?check_suite_focus=true

I don't know what wasm32-wasi-cabal, but it clearly is not the same as cabal. Why do we have this even?

@TerrorJack

Copy link
Copy Markdown
Contributor

It's now a cabal bound issue, since ghc-wasm32-wasi uses a ghc-head build. I'm looking into relaxing bounds in the wasm32 cabal.project file atm.

@hasufell

Copy link
Copy Markdown
Member Author

We might have been hit by https://gitlab.haskell.org/ghc/ghc/-/issues/21738

@TerrorJack

Copy link
Copy Markdown
Contributor

@hasufell Thanks for the pointer! Given filepath is vendored in template-haskell in latest head which should resolve this issue, I'll proceed to update ghc-wasm32-wasi to latest head to unblock CI, but that'll take a couple more hours, are you fine with this timeframe?

@TerrorJack

Copy link
Copy Markdown
Contributor

To provide more context, the job is to added to test unix support for wasm32-wasi platform, upcoming in 9.6, with more details in https://gitlab.haskell.org/ghc/ghc/-/wikis/WebAssembly-backend

@hasufell

Copy link
Copy Markdown
Member Author

@hasufell Thanks for the pointer! Given filepath is vendored in template-haskell in latest head which should resolve this issue, I'll proceed to update ghc-wasm32-wasi to latest head to unblock CI, but that'll take a couple more hours, are you fine with this timeframe?

Yes

@TerrorJack

Copy link
Copy Markdown
Contributor

If you push the fix at https://gist.github.com/TerrorJack/6352f35dc53e7b1b1baef4391ff86c3d, the ci-wasm32-wasi job should have been fixed now.

@hasufell hasufell force-pushed the AFPP branch 2 times, most recently from 8605076 to 2d86597 Compare July 12, 2022 17:29

@hs-viktor hs-viktor left a comment

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.

LGTM. Modulo a pending rebase and ideally a successful CI run.


import System.Posix.Types
import System.Posix.IO.Common
import System.Posix.IO.ByteString ( fdRead, fdWrite )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We import fdRead and fdWrite from ByteString now.

@Bodigrim

Copy link
Copy Markdown
Contributor

@hasufell there are several redundant imports. GHC build will choke on warnings.

@hasufell hasufell force-pushed the AFPP branch 2 times, most recently from be2f725 to 7f32a74 Compare July 16, 2022 23:14

@Bodigrim Bodigrim left a comment

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.

Thanks, great!

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.

5 participants