-
Notifications
You must be signed in to change notification settings - Fork 92
JS: add support for utimes/lutimes/futimes #285
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
Conversation
How can we test this in CI? |
You need to build GHC with the JS backend enabled. Apparently CI is using ghcup so it would be good to fix haskell/ghcup-hs#838 first |
@hsyl20 it's fine to add a custom CI job, which manually grabs GHC JS from elsewhere, without |
We're in the process of fixing GHCup to build cross-compilers. Moritz, however, suggested that we use the haskell.nix infrastructure to avoid the build times. I'll try this. |
I personally don't want to maintain nix code in CI. GHCup should be fixed to be able to install cross toolchain from bindist as well. |
Nix would only be used to provide the environment with the appropriate ghc (
Sadly upstream doesn't provide JS bindists. Does ghcup already provide custom bindists (and where are they hosted)? |
Yes, my experience with nix has been rather negative and I want to avoid pinging other people whenever there's a problem with it (and IME, there are a lot).
We can just build our own. |
I have incorporated this change into ghc!9237 which passed CI. |
@bgamari the reason we insist on GitHub CI job is so that the feature does not get accidentally broken in the very next commit. We cannot really tell all future contributors "go bump a submodule in GHC source tree and check that it works, then report back". |
ghcup is very close to being able to install ghc JS cross from bindist. I already built one: https://downloads.haskell.org/~ghcup/unofficial-bindists/ghc/javascript-unknown-ghcjs-9.6.2/ It'll require another ghcup release first. Then we'll maintain a separate ghcup metadata for JS. |
Note that all tests have been disabled because none of them passes due to missing C function support (e.g. pipe). But it's a good basis to start adding tests for supported things (e.g. touchFd, cf haskell#285). This requires a recent version of GHC that provides getMonotonicTimeNSec. See https://gitlab.haskell.org/ghc/ghc/-/issues/23687 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10900.
Note that most tests have been disabled because they don't pass due to missing C function support (e.g. pipe). But it's a good basis to start adding tests for supported things (e.g. touchFd, cf haskell#285). This requires a recent version of GHC that provides getMonotonicTimeNSec. See https://gitlab.haskell.org/ghc/ghc/-/issues/23687 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10900.
Note that most tests have been disabled because they don't pass due to missing C function support (e.g. pipe). But it's a good basis to start adding tests for supported things (e.g. touchFd, cf haskell#285). This requires a recent version of GHC that provides getMonotonicTimeNSec. See https://gitlab.haskell.org/ghc/ghc/-/issues/23687 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10900.
Can't we just build a bindist from the current 9.8 branch? I already have ghcup CI that tests I don't think CI is prerequisite to get this merged, but it needs to remain a TODO list, so that we don't regress. |
After https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10900 is backported, we can.
I've opened #291 to track this. |
I'm working on a test for this PR but I need https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10909 to fix |
Note that most tests have been disabled because they don't pass due to missing C function support (e.g. pipe). But it's a good basis to start adding tests for supported things (e.g. touchFd, cf #285). This requires a recent version of GHC that provides getMonotonicTimeNSec. See https://gitlab.haskell.org/ghc/ghc/-/issues/23687 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10900.
@hsyl20 could you please rebase? How can I test this patch manually? |
@Bodigrim I'm on vacation this week but next week sure. I have a wip test but it isn't complete yet. There is also a test for touchFd in the ghc MR. |
I've rebased. Test is stil wip and depends on (at least) https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10909 (currently being merged). |
In particular, add support for
touchFd
required here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9237Cc @bgamari