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

terminalSpawnSync deprecation error #156

Open
felipebalbi opened this issue Jun 22, 2020 · 6 comments
Open

terminalSpawnSync deprecation error #156

felipebalbi opened this issue Jun 22, 2020 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@felipebalbi
Copy link
Contributor

felipebalbi commented Jun 22, 2020

while trying to build Termonad I get the following deprecation error:

Configuring termonad-3.1.0.1...  termonad> build (lib + exe)
Preprocessing library for termonad-3.1.0.1..  Building library for
termonad-3.1.0.1..  [ 1 of 15] Compiling Paths_termonad [ 2 of 15]
Compiling Termonad.Pcre [ 3 of 15] Compiling Termonad.Prelude [ 4 of
15] Compiling Termonad.Gtk [ 5 of 15] Compiling Termonad.Config.Vec [
6 of 15] Compiling Termonad.Types [ 7 of 15] Compiling
Termonad.PreferencesFile [ 8 of 15] Compiling Termonad.Lenses [ 9 of
15] Compiling Termonad.Term

/.../termonad/src/Termonad/Term.hs:365:5: error:
    [-Wdeprecations, -Werror=deprecations] In the use of
    ‘terminalSpawnSync’ (imported from GI.Vte, but defined in
    GI.Vte.Objects.Terminal): Deprecated: "(Since version 0.48) Use
    'GI.Vte.Objects.Terminal.terminalSpawnAsync' instead."  | 365 |
    terminalSpawnSync | ^^^^^^^^^^^^^^^^^

-- While building package termonad-3.1.0.1 using:
      /...1termonad/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup
      --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0
      build lib:termonad exe:termonad --ghc-options "" Process exited
      with code: ExitFailure 1

I've been looking on GI.Vte docs, but terminalSpawnAsync isn't defined anywhere. For now, I've disabled -Werror from my stack config

@cdepillabout cdepillabout added enhancement New feature or request help wanted Extra attention is needed labels Jun 22, 2020
@cdepillabout
Copy link
Owner

Thanks for reporting this.

This has been around for a long time now, but I haven't looked into actually figuring it out.

If someone wants to figure it out and send a PR, I'd be happy to merge it in.

@felipebalbi
Copy link
Contributor Author

I think this requires a change in gi-vte before modifying Termonad.

@felipebalbi
Copy link
Contributor Author

Hi @cdepillabout, gi-vte was updated and I'm working on trying to remove terminalSpawnSync. Having issues compiling with latest haskell-gi and friends. I'll keep trying tomorrow and update this issue again.

@cdepillabout
Copy link
Owner

@felipebalbi Thanks for the update. For now, you can feel free to use an older version of gi-vte.

I try to make Termonad compilable with the latest LTS version (although I don't know if I ever updated it for LTS-16).


If fixing the terminalSpawnSync thing requires the latest version of gi-vte, you can feel free to first send a PR updating Termonad to use that latest version, and then send a follow-up PR actually fixing terminalSpawnSync.

@cdepillabout
Copy link
Owner

I think this has been fixed in gi-vte in haskell-gi/haskell-gi#297. Also, Termonad now compiles successfully with the latest version of gi-vte.

So I think all that is left now is to just switch over to using terminalSpawnAsync, since it should be available from the latest version of gi-vte.

@mgttlinger
Copy link

Ok, so I'm looking into this. The issue I have with changing to the async variant is that the surrounding code wants the PID of the launched process which is accessible only through a callback. Calling the async variant and then blocking until the callback has stored the PID somewhere feels wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants