Coder Social home page Coder Social logo

Comments (9)

Nereboss avatar Nereboss commented on September 22, 2024 1

Tested it out and everything works as expected on mac, windows and in git bash 👍

from kotter.

Nereboss avatar Nereboss commented on September 22, 2024

After further testing, this seems to be more a problem of the input method rather than sessions itself. I tried these three examples for testing:

Example 1:

session {
    section { text("test") }.run()
}

session {
    section { input() }.runUntilInputEntered()
}

Even though two sessions were started after another, input in the second session behaved like expected.

Example 2:

session {
    section { text("test") }.runUntilSignal { signal() }
}

session {
    section { input() }.runUntilInputEntered()
    section { input() }.runUntilInputEntered()
}

This example is closer to the one in the original issue but here everything works as expected as well.

Example 3:

session {
   section { input(isActive = false) }.run()
}

session {
    section { input() }.runUntilInputEntered()
}

This example opens two inputs in two different sections but the 2nd input still behaves normal.

My guess would be that when opening a new session or during closing of the previous session, the first input is not deactivated, resulting in both being active at the same time.

from kotter.

Nereboss avatar Nereboss commented on September 22, 2024

@bitspittle any idea why this issue might occur? It also seems to produce different behaviour on unix and windows machines and also behave differently in powershell and git bash

from kotter.

bitspittle avatar bitspittle commented on September 22, 2024

Huge apologies for not replying! I just had an insanely busy week. Literally just started coming up for air today.

It definitely sounds like a bug.

Note that different OSes have different terminal implementations.

Unix: https://github.com/varabyte/kotter/blob/main/kotter/src/posixMain/kotlin/com/varabyte/kotter/terminal/native/NativeTerminal.kt

Windows:
https://github.com/varabyte/kotter/blob/main/kotter/src/winMain/kotlin/com/varabyte/kotter/terminal/native/NativeTerminal.kt

Although I should check -- are you using the JVM target when you build your app? Or the specific native targets?

If you're targeting the JVM, I'm using a library for that (JANSI?), and they too have different Windows and Unux implementations.

I assume git bash on Windows is actually using a Unix emulator, but I'm not 100% sure. Still, if so, that could make the difference make sense.

from kotter.

Nereboss avatar Nereboss commented on September 22, 2024

We only use the JVM target.
We are currently trying to overhaul the cli of another open source project (CodeCharta).
Just linking it here in case there are any project specific questions that can be answered with a quick look at the project^^

from kotter.

bitspittle avatar bitspittle commented on September 22, 2024

@Nereboss I know it's been quiet here, so first I wanted to say thanks so much for the report. I just started looking into this today (sorry, I was super stuck in Kobweb stuff for the last two weeks).

I'm able to repro, and the issue looks very much like it's in my code.

If all goes well, I'll have a 1.1.2-SNAPSHOT build up by end of day you can test.

from kotter.

bitspittle avatar bitspittle commented on September 22, 2024

OK, I've published a new snapshot. @Nereboss if you want to test this, please update Kotter to 1.1.2-SNAPSHOT in your libs.versions.toml file.

You also need to add a special maven snapshots repository, which I just added a new README section about here: https://github.com/varabyte/kotter/?tab=readme-ov-file#testing-snapshots

from kotter.

bitspittle avatar bitspittle commented on September 22, 2024

Thanks for the confirmation.

I'm aiming to release a new Kotter version in the next day or two. You can continue to use the snapshot version if you'd like -- things are not going to change appreciably between that and the final version (unless you found yourself using the new grid builder, at which point there's still a bit of work landing today)

from kotter.

bitspittle avatar bitspittle commented on September 22, 2024

This should now be fixed in 1.1.2. Thanks for the report!

from kotter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.