janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.52k stars 227 forks source link

Move scoop manifest to scoop extras bucket #533

Closed littleli closed 2 years ago

littleli commented 3 years ago

Hi Calvin,

Thank you for starting this wonderful project. I noticed there is a scoop bucket repository, which is not maintained. As far as I understand you have no time or will to give it more love, which btw I completely understand and respect. So let me propose the following:

  1. Let's put together a decent manifest file
  2. Let's submit this manifest into the scoop extras bucket.

The reason to put it in extras bucket has some advantages. They have machinery in place to check and publish for never releases automatically. The only thing you have to maintain consistency of what you produce. No breaking changes in terms of how you put together the artifact. I believe it's already fairly stable in case of janet. Even though there maybe breaking changes it's not that difficult to submit an update to extras bucket, I or anyone else can handle that eventually too.

The final experience for the user would be like this:

scoop bucket add extras
scoop install janet

To be honest I already built a working initial version of the manifest, but before I do any action on my own I would like to ask you for thumb up. I don't want to do anything behind your back. Let me know what you think.

Cheers

littleli commented 3 years ago

This is how the manifest can look like.

{
    "homepage": "https://janet-lang.org",
    "description": "Janet is a lisp-like, embeddable, functional and imperative programming language and bytecode interpreter.",
    "license": "MIT",
    "version": "1.13.1",
    "architecture": {
        "32bit": {
            "hash": "627a0dccef7815fdde735caf3ea2eb3e16f2ec26ac3d0cc365cf8ea67589d5e3",
            "url": "https://github.com/janet-lang/janet/releases/download/v1.13.1/janet-v1.13.1-windows-x86-installer.msi"
        },
        "64bit": {
            "hash": "ef5d32257594c8ab54aaa52fe8e84bb951a4883bbb6f6848e845759122d33a35",
            "url": "https://github.com/janet-lang/janet/releases/download/v1.13.1/janet-v1.13.1-windows-x64-installer.msi"
        }
    },
    "autoupdate": {
        "architecture": {
            "32bit": {
                "url": "https://github.com/janet-lang/janet/releases/download/v$version/janet-v$version-windows-x86-installer.msi"
            },
            "64bit": {
                "url": "https://github.com/janet-lang/janet/releases/download/v$version/janet-v$version-windows-x64-installer.msi"
            }
        }
    },
    "checkver": {
        "github": "https://github.com/janet-lang/janet"
    },
    "bin": [
        "Janet\\bin\\janet.exe",
        ["Janet\\bin\\janet.exe", "jpm", "$dir\\Janet\\bin\\jpm"]
    ],
    "env_set": {
        "JANET_BINPATH": "$dir\\Janet\\bin",
        "JANET_PATH": "$dir\\Janet\\Library",
        "JANET_HEADERPATH": "$dir\\Janet\\C",
        "JANET_LIBPATH": "$dir\\Janet\\C"
    },
    "installer": {
        "script": "add_first_in_path \"$dir\\Janet\\bin\" $global"
    },
    "uninstaller": {
        "script": "remove_from_path \"$dir\\Janet\\bin\" $global"
    }
}
pepe commented 3 years ago

I went ahead and look what scoop actually is (as I am not windows user myself). From what I can understand, this can be a very good distribution channel for the Janet

sogaiu commented 3 years ago

FWIW, I have been happily using scoop for some time now.

Good to see you @littleli !

bakpakin commented 3 years ago

I actually had written an earlier version of a scoop bucket but Janet has changed since then, so it is probably not really useful anymore. However, the release process has indeed become stable so the above should work.

LGTM.

littleli commented 3 years ago

@bakpakin I need to clarify how to setup environment variables for Janet. Can you explain what is necessary, what is not, and what is the purpose?

The maintainer wants to clarify this as we don't want to pollute classpath and environment variables with something that is not necessary, maybe because they're inferred etc.

sogaiu commented 3 years ago

May be the following would be of some use?

https://github.com/janet-lang/janet/blob/master/jpm.1#L212-L266

FWIW, that's from the jpm.1 man page.

I'm not sure if there is something that is more web-friendly in format.

sogaiu commented 3 years ago

Possibly no longer necessary, but I found this comment by bakpakin where he explains the various paths: https://github.com/janet-lang/janet-lang.org/issues/79#issuecomment-687628041

littleli commented 3 years ago

I failed to add janet to the official scoop bucket. I have no will to wrestle with maintainers. My attempt is available in my personal bucket for those who are interested.

sogaiu commented 3 years ago

@littleli Thanks for your efforts!

(Looks like scoop is less stable than I had imagined.)

littleli commented 3 years ago

@sogaiu Maintainers are stricter than me in what they expect. My view is I want to give user powers, not restrict what they want or do even though it means to poison PATH. setup certain environment variables, or enable jpm even though it has some huge dependency on Visual C++ (if I remember correctly). That's why it's great that Scoop nature is decentralized.

pyrmont commented 2 years ago

Thanks to @littleli, Janet is now in the main bucket as of ScoopInstaller/Main#3149. This issue can now be closed.

Congrats @littleli!

sogaiu commented 2 years ago

Thanks @littleli!