refaktor / rye

homoiconic dynamic programming language with some new ideas
https://ryelang.org
Apache License 2.0
462 stars 22 forks source link

Enable build on windows in CI and on release #263

Closed stefanb closed 3 months ago

stefanb commented 3 months ago

Windows support was added by @xypwn in

and then broken in

...which should be fixed in: https://github.com/refaktor/rye/blob/bd61e7f2d951f953a42c4d566e3969d88ffa218b/util/getcolumns_native.go#L18-L23

refaktor commented 3 months ago

You are correct. We will bring back windows support, also need to solve terminal width in browser.

Thank you for reporting it.

refaktor commented 3 months ago

I have a potential fix, but I can't seem to fork your repository to create a PR for it ... I could merge and then fix but I'm not particularly in favor of having temporarily broken sign on the repo :P ... Maybe there is a third way and I don't know? This would be the new util/getcolumns_native.go


//go:build !wasm
// +build !wasm

package util

import (
    tsize "github.com/kopoli/go-terminal-size"
)

func GetTerminalColumns() int {
    var s tsize.Size

    s, err := tsize.GetSize()
    if err == nil {
        return s.Width
    }
    return 50
}
``
stefanb commented 3 months ago

Tnx, @refaktor, I have applied your suggested fix to this PR in fb304ee3ab54f474ec34a5750c635e66d807c716.