Closed maximousblk closed 4 years ago
SGTM!
But I am not sure if the nightly build you provided is stable.
In theory, we only need to deal with nightly tag like this
jobs:
build:
runs-on: ubuntu-16.04
strategy:
matrix:
deno: ["v1.x", "nightly"]
name: Deno ${{ matrix.deno }} sample
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: ${{ matrix.deno }}
- run: deno run https://deno.land/std/examples/welcome.ts
I prefer to get the nightly build version via the official
Maybe you can feedback to @ry and make it become official
Thanks for your interest!
But I am not sure if the nightly build you provided is stable.
yes they are not guaranteed to be stable because they are built from the master branch of the deno repo. they are only for testing purposes.
deno: ["v1.x", "nightly"]
this would not work because the nightly builds are named deno-nightly
so that we can use it without disturbing the stable installation on our local machines
yes they are not guaranteed to be stable because they are built from the master branch of the deno repo. they are only for testing purposes.
I mean, Are the servers built daily stable? Will there be server down, Apis rate limit? domain name replacement? and other uncertainties.
I mean, Are the servers built daily stable?
you lost me there. If you are referring to the servers where Deno is built, it's github actions.
but
domain replacement and server downtime would depend on github because to get the latest build, all you need is to download from github releases.
export function getDownloadUrl(): string {
const platform = getDenoPlatform(version);
const arch = getDenoArch(version);
let filename: string = `deno-nightly-${arch}-${platform}.zip`;
return `https://github.com/maximousblk/deno_nightly/releases/download/latest/${filename}`;
}
You don't need to use GitHub API to get the releases and I don't think github rate limits release downloads.
I’m curious why deno-nightly
instead of deno
Is there any special reason?
- uses: denolib/setup-deno@v2
with:
deno-version: nightly
- - run: deno run https://deno.land/std/examples/welcome.ts
+ - run: deno-nightly run https://deno.land/std/examples/welcome.ts
I chose deno-nightly
because there is no other way to differentiate between the stable and nightly binaries because the nightly builds have the privious version on them. And I didn't want to modify the source because... trust.
The other reason is you can have a nightly build and stable version on your local machine both at the same time. So it does not disturb your current dev environment and still gives you an option to test your unpushed code.
It would be really nice if this action included an option for using deno nightly builds
As you may know there are many modules breaking due to the URL definition update and
Deno.dir()
removal.We at nest.land prevent these bugs by testing our modules on the Deno Nightly builds. But not all other do this yet. and it is a bit finicky to set this up right now. and because of that the dependencies that we use tend to break our modules. which feels like we know what's wrong and know how to fix it but have to wait for the module owners to fix it.
So if this action included nightly builds option more module authors could set this up easily and prevent such breaking.
I tried making a new action but didn't get much success at it.
It is really easy to get the latest nightly build. there is a release tagged
latest
which is updated with the latest build daily. so you don't have to do all the regex stuff and just directly link to the latest build if the Deno version is set tonightly
. there are separate build releases too tagged by the date they were built.Deno Nightly repo: maximousblk/deno_nightly
so for using the latest nightly build you would do: