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

Merge setup-erlang in #9

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Merge setup-erlang in #9

merged 1 commit into from
Mar 30, 2021

Conversation

paulo-ferraz-oliveira
Copy link
Collaborator

@paulo-ferraz-oliveira paulo-ferraz-oliveira commented Mar 16, 2021

I'll make a self-review after which I welcome yours.

This description may see actions added to it if decisions are yet to be made.

Note: where I previously had erlang, I now have otp (as per what was present in this action already). Lemme know if I should rename anything.


I add:

  • JavaScript -based linting
  • a CI process to make sure what we're releasing doesn't miss anything
  • rebar3-version -based elements to CI
  • input rebar3-version to the action (everything else remains untouched)
  • tests for added stuff
  • a rebar3 installation (bash) script that fetches versions from GitHub
  • some tests for robustness
  • error messages (some console, some core)
  • version output to the install actions (shell scripts) to make it easier to debug (and not force consumers to look at the outputs)

I change:

  • licenses to yarn -based (thus deleting tons of files from the repo, and adding 3RD PARTY LICENSES)
  • Markdown as per linting
  • phrasing "OTP" to "Erlang/OTP", by default (mostly everywhere if not everywhere)
  • shell scripts as per linting
  • input elixir-version so it becomes optional
  • some internals (with test specific code) so it's easier to test locally
  • CI to make sure it breaks when it should
  • the code as to separate "production" from "test"
  • the shell scripts in order to make the more closely related (helps reason for updates)
  • exception handling to cover all the cases
  • test.yml ever so slightly in order to make sure backward compatibility is kept while adding new CI stuff
  • action.yml ever so slightly

I remove:

  • licensed-based license management (and associated assets)
  • stuff that linting was complaining about not being used

All of this means the action should be fully backward compatible.

Also, closes #15.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Self-review is finished. Bash away.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I'll make the test fixes in a separate commit so as to not disturb the "base". (I'll keep squashing on top of that one until everything's fine)

dist/install-otp1 Outdated Show resolved Hide resolved
Copy link
Collaborator

@ericmj ericmj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a first pass on this and left some comments. Great work!

There seems to be some dist/ files and directories that seems duplicated and end with 1 in the name. Can you look into that?

src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
@paulo-ferraz-oliveira
Copy link
Collaborator Author

There seems to be some dist/ files and directories that seems duplicated and end with 1 in the name. Can you look into that?

I have looked into that. I could remove them by hand, but then ncc build would just recreate them (I'm not doing anything special here[1], and I've tried recreating the project from scratch; they still get generated). Some kind of ncc magic I don't know how to solve.


[1] @ericmj, let me know if, locally, you run ncc build (after deleting dist) and get different results (it might be a Mac OS X thing, I don't know).

@ericmj
Copy link
Collaborator

ericmj commented Mar 17, 2021

If the files end with 1 it's not a big issue but I think the duplicate files can cause issues.

Can you try to find the change that is causing the duplicates since we didn't have them before?

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Can you try to find the change that is causing the duplicates since we didn't have them before?

You mean go over ncc and try to figure out if this is a bug? I'm not quite sure how to do it otherwise, since I've looked (and couldn't find) any specific options or different way of doing things. (also, did you test it locally?)

@ericmj
Copy link
Collaborator

ericmj commented Mar 17, 2021

I can't test locally currently.

It looks like the package is deprecated https://www.npmjs.com/package/@zeit/ncc. You can try the package that replaces it.

@ericmj
Copy link
Collaborator

ericmj commented Mar 17, 2021

You mean go over ncc and try to figure out if this is a bug?

We don't have duplicates in dist/ in main currently so something has changed that is causing them to be generated. Either in the changes in this PR or elsewhere.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I can't test locally currently.

It looks like the package is deprecated https://www.npmjs.com/package/@zeit/ncc. You can try the package that replaces it.

I thought I'd updated it to vercel. In any case, I get the same behaviour locally with that new package. I can dig further, but I wouldn't want to have to path ncc if it comes to that.

(just check, and I did update to vercel latest - actually IIRC I updated all the node.js deps to latest)

@paulo-ferraz-oliveira
Copy link
Collaborator Author

You mean go over ncc and try to figure out if this is a bug?

We don't have duplicates in dist/ in main currently so something has changed that is causing them to be generated. Either in the changes in this PR or elsewhere.

I agree. Something has changed. But even in setup-erlang I got the duplicates and I still hadn't mixed that with setup-elixir. Let me try to find some time to tackle it, later.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 18, 2021

b58b61c addresses comments:

I'm still missing a follow-up on:

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I may have traced down the "duplicate dist stuff" to the fact the __tests__ folder includes and gets included by setup-elixir.js.

@ericmj
Copy link
Collaborator

ericmj commented Mar 18, 2021

I may have traced down the "duplicate dist stuff" to the fact the tests folder includes and gets included by setup-elixir.js.

Why are the test files included?

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I may have traced down the "duplicate dist stuff" to the fact the tests folder includes and gets included by setup-elixir.js.

Why are the test files included?

I'm not actually sure (since have little knowledge of ncc) but believe it's linked to that by the fact we're using the .txt files. As per a more recent comment, I'll try to separate those and see what happens.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

I was able to solve the "duplicate file" thing by completely separating test code from production code (when I started working on this the mix was already there, and I wrongly continued working on top of that).
I was able to simplify both the production code and test.yml, as well as improving maintenance on the test code.
I hopefully got everything in here, so will now only (again!) concentrate on fixing per test results.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Lemme know if the current status is "OK for merge". I'd like to test it in a few projects before moving to master but am yet unaware of how to target a specific branch for an action.

src/install-otp Outdated Show resolved Hide resolved
@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 22, 2021

I will revert [1] to [0] in the match procedure. In any case, versions is

  'v1.8.0' => [ '20', '21', '22' ],
  'v1.8.0-rc.0' => [ '20', '21', '22' ],
  'v1.8.0-rc.1' => [ '20', '21', '22' ],
  'v1.8.1' => [ '20', '21', '22' ],
  'v1.8.2' => [ '20', '21', '22' ],
  'v1.9' => [ '20', '21', '22' ],
  'v1.9.0' => [ '20', '21', '22' ],
  'v1.9.0-rc.0' => [ '20', '21', '22' ],
  'v1.9.1' => [ '20', '21', '22' ],
  'v1.9.2' => [ '20', '21', '22' ],
  'v1.9.3' => [ '20', '21', '22' ],
  'v1.9.4' => [ '20', '21', '22' ]

so I fail to see how we can match OTP-... in that.

Edit: I've not yet reverted anything.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 22, 2021

Also, let's assume https://repo.hex.pm/builds/elixir/v1.10.3.zip exists (in which case, OTP- is not required, all the tests pass, but the code is still wrong). If you try that link it works, so my (again) strong suspicion is that we're potentially not targeting the OTP we think we are[1]. @starbelly, can you add a erl -version in erlef/website and then compare the emulator version with what you're expecting?

Edit: I have local changes prepared to push for an update, but I really want to be sure of what I'm pushing.
Edit: for 23.1.2 you should have ERTS 11.1.2, per https://erlang.org/download/otp_versions_tree_app_vsns.html


[1] or rather we might be, but out of coincidence. (to be really sure just change that value to some nonsense like 245 - OTP version).

@starbelly
Copy link
Member

starbelly commented Mar 22, 2021

@paulo-ferraz-oliveira yeah, I get back 11.1.2 for erlef/website. https://github.com/erlef/website/pull/296/checks?check_run_id=2162938782 . See compile task.

Edit:
Also note: https://github.com/erlef/website/pull/296/checks?check_run_id=2162985477 . Used version 233 in that run to be sure.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 23, 2021

I'll want to:

  • add a test to go through the build listings and make sure our regexps cover all lines (this mighty imply having the regexp in a function or so).

@ericmj
Copy link
Collaborator

ericmj commented Mar 23, 2021

I don't know what the context of the regexes are. Are they from the code base or are they the version strings we are supposed to support?

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 23, 2021

I don't know what the context of the regexes are. Are they from the code base or are they the version strings we are supposed to support?

Sure, my bad. I added a bit of text to the table. Those are the regexps as used by the code to find stuff while parsing the listings, but more generically they attempt at representing the way the different pieces are actually versioned.


Edit: e.g. (?:OTP-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:\.\d+)?(?:\-rc\d+)?))|(maint(?:\-\d+)?|master), for "Elixir version (from listing)", should cover all versions in https://repo.hex.pm/builds/elixir/builds.txt.

@ericmj
Copy link
Collaborator

ericmj commented Mar 23, 2021

What's the reason for filtering certain branches? I don't think we should try to predict what builds will provided so we should support any branch name.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 23, 2021

What's the reason for filtering certain branches? I don't think we should try to predict what builds will provided so we should support any branch name.

We're not filtering "branches", but "versions" (that's what I assumed the builds.txt was doing). In any case, I'm just seemingly following what I assumed was in place; stuff like https://github.com/erlef/setup-elixir/blob/main/src/setup-elixir.js#L115. I don't mind the regexp is MUCH more relaxed, though, and the previous table would thus become:

What Regexp (as currently found in this PR's code base) What the Regexp could/should be
Elixir ^v(\d+\.\d+\.\d+(?:-.+)?) ^([^ ]+ ) (while testing with and without v)
Elixir/OTP major ^OTP-([^\.]*) should be an input from an output from function installOTP
Erlang/OTP (from listing) ^OTP-([\.\drc\-]+) ^([^ ]+ ) (while testing with and without OTP-)
Elixir version (from listing) ^(v\d+\.\d+\.\d+(?:-.+)?)-otp-(\d+) or ^([^-]+)-otp-(\d+) Reuse "Elixir"
rebar3 (from listing) ^([\.\d]+) no match required, since releases are well identified

Another example: https://github.com/erlef/setup-elixir/blob/main/src/setup-elixir.js#L135 already filters input, but it's probably not required (easier code and easier to reason about which build are available).

@ericmj
Copy link
Collaborator

ericmj commented Mar 23, 2021

that's what I assumed the builds.txt was doing

builds.txt is a listing of what builds are currently provided, but builds may be added and removed from it any time so we shouldn't base regexs on what is currently in the file.

In any case, I'm just seemingly following what I assumed was in place; stuff like https://github.com/erlef/setup-elixir/blob/main/src/setup-elixir.js#L115

Here we are removing OTP- so that users can specify their version as 21.2.3 instead of OTP-21.2.3. But in the if below we also accept names that do not start with OTP-.

Another example: https://github.com/erlef/setup-elixir/blob/main/src/setup-elixir.js#L135 already filters input, but it's probably not required (easier code and easier to reason about which build are available).

On the line below we accept any version name. The intention is not to filter here, we are separating the elixir version component and the otp version component from the string.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

builds.txt is a listing of what builds are currently provided, but builds may be added and removed from it any time so we shouldn't base regexs on what is currently in the file.

Sure, which is why I propose an even further relaxed regexp of "everything until the first space", where the only assumption is the file format will not change, an assumption already in place for the current code.

Here we are removing OTP- so that users can specify their version as 21.2.3 instead of OTP-21.2.3. But in the if below we also accept names that do not start with OTP-.

I know, and understand, but not everything will be a valid version, right? e.g. one that's not in the file (which is why now we crash). Would it not make sense to be more relaxed in the matching here, as well?

On the line below we accept any version name. The intention is not to filter here, we are separating the elixir version component and the otp version component from the string.

Sure. Again, understood, but I think we'd benefit from a more relaxed approach, in any case. As you stated, it's probably the file contents change (including the version format, not controlled by us), but it's less likely the file's format changes, right?

I'll propose a new approach to the regex and let you decide, so you have a term of comparison.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

@ericmj, I ended up simplifying the regexp, but not as much as I wanted/thought it would be possible. What I aimed for was complete coverage of the existing build listing (but not making many assumptions). I also added a ton of version combos so we can test it as much as possible. Do let me know if you want a specific version combo (semver, master, whatever, ...) so I can update the tests with that.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

@ericmj, I eventually found the error to be Erlang installed in the container at /usr/bin/erl and the bad path manipulation in this pull request (now fixed[1]) was causing it to be used instead of the installed Erlang.


[1] In the main action you're prepending to the path; I was appending to it (I wasn't aware - at all - that Erlang was installed by default in Ubuntu).

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Here's a list of the previously failing combos showing that now some pass: https://github.com/paulo-ferraz-oliveira/setup-elixir/runs/2197844972?check_suite_focus=true. (the ones failing, in 18.04 are ALL ssl-related).

Also, I've changed the min. Elixir version of the test-project to 1.0? It was preventing functioning CI tests from running.

@starbelly
Copy link
Member

Also, I've changed the min. Elixir version of the test-project to 1.0?

That makes sense, since elixir has to support all the way back to 1.0

@paulo-ferraz-oliveira
Copy link
Collaborator Author

This is ready for review.

Copy link
Member

@starbelly starbelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has been a big effort and I think the fallout is beautiful. It is extremely well tested (and we actually now see when the tests fail), the js code is so much easier to follow, bugs were found and squashed. All of these improvements will make supporting this 💯 easier. Thus I approve 🚀 ❤️ 💜 💛 💚 🧡 💙

I do think @ericmj needs to take a pass as well before we merge.

Copy link
Collaborator

@ericmj ericmj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a second review. Left a few comments, mostly questions, but overall it's a great. Particularly like the extra attention given to testing, we will be more comfortable doing changes in the future with the extensive testing.

}

async function testOTPVersions() {
const otpBuildsListing = listing('otp_builds.txt')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we require network connection for other tests what about dropping these files and fetching the actual files for simplicity. That way we will also catch any issues with changes to the files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do that, sure. I'm just afraid that changing some of these will actually lead to different test results (e.g. I can't use 1 as a version since that'll yield different results as soon as builds.txt changes), but I can do it, no prob.

Copy link
Collaborator Author

@paulo-ferraz-oliveira paulo-ferraz-oliveira Mar 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f79efb2: done. I'm afraid tests (may have) lost some quality, though, as per what I explained previously (if depending on a dynamic environment we can't actually be sure of what'll happen when we do stuff like '^1.10')

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do the tests on version ranges that are no longer supported and won't be updated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what supposedly did, with this change. In any case, to be completely sure, I'd have to know exactly what isn't supported. We can deal with mishaps, if any, later, if new versions come out that change test results.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find supported Elixir versions here: https://hexdocs.pm/elixir/compatibility-and-deprecations.html#content. I would guess Erlang has similar documentation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OT: when you resolve conservations after responding it is very hard to find your replies.

Copy link
Collaborator Author

@paulo-ferraz-oliveira paulo-ferraz-oliveira Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OT: when you resolve conservations after responding it is very hard to find your replies.

Sorry about that. It sometimes happens.

Is anything missing regarding this conversation, in particular?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Erlang/OTP testing: https://github.com/erlef/setup-beam/pull/9/files#diff-c76af13c0a24fd165fe6700b8b1254b6a48a60b9ddfcb39dcad476a725f8106bR84 (all results belong to no-longer-supported versions)
This is Elixir testing: https://github.com/erlef/setup-beam/pull/9/files#diff-c76af13c0a24fd165fe6700b8b1254b6a48a60b9ddfcb39dcad476a725f8106bR109 (all results belong to no-longer-supported versions)
This is rebar3 testing: https://github.com/erlef/setup-beam/pull/9/files#diff-c76af13c0a24fd165fe6700b8b1254b6a48a60b9ddfcb39dcad476a725f8106bR133 (all results belong to no-longer-supported versions)

I assume we're good (?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good!

src/install-elixir Outdated Show resolved Hide resolved
src/installer.js Outdated
if (
process.platform !== 'linux' &&
process.env.CI_TEST_ENV !== 'test' &&
process.platform !== 'darwin'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should not be here, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should IMO. Locally I should be able to test on a Mac (especially since it works), but if you prefer I can take it out and only assume Linux based testing (will be kinda hindering for updating though - since I have to add it for testing, and remove it before pushing).

Copy link
Collaborator Author

@paulo-ferraz-oliveira paulo-ferraz-oliveira Mar 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted this change. It'll simply imply more force-pushes on my behalf to get stuff running properly. No biggie, though. (if somebody runs into issues because of this, in the future, we can reconsider our approach)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it work on mac if erlang is compiled against linux?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup-elixir.test.js presents two types of tests:

  • failing installs (e.g. inexisting file or input not accepted)
  • version-based tests (testing against semver)
    None of these require the builds to actually run, since we're interested in other conditions, so there's no difference in running them in Linux and Mac, except that without allow process.platform darwin you can't actually properly run these locally.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I would recommend unit testing that functionality directly so it doesn't go through this check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have e.g. https://github.com/erlef/setup-elixir/pull/9/files#diff-3e35f8d82312f568d749abab56e430c703198c68e3b8468454005ac9bc806797R10. Do you prefer me to test

exec(path.join(__dirname, 'install-otp'), [
    osVersion,
    otpVersion,
  ])

directly? (as is, now, it's only affecting local testing, not remote)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move on this front, lest the answer is "yes" and then I lose the opportunity for a further review. 😄

Copy link
Collaborator Author

@paulo-ferraz-oliveira paulo-ferraz-oliveira Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the validation (312b42b) since if we're not doing it for tests there's no need to do it any way (since setup-elixir.js already does it at start).

src/installer.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
src/setup-elixir.js Outdated Show resolved Hide resolved
@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Mar 29, 2021

Now I should rebase on top of main.


Done: 0b79c31

src/installer.js Outdated
await exec(path.join(__dirname, 'install-elixir'), [version, otpString])
}
async function installElixir(elixirVersion) {
return await exec(path.join(__dirname, 'install-elixir'), [elixirVersion])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think async + return await is redundant unless you do something like wrap try .. catch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'll remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is async and a single await also redundant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... that's a good question. I've always used async so that consumers await on my function. If exec is async, though, without await the function should just return "instantaneously".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async function first() {
    await exec()
    console.log('first')
}

async function exec(Cmd) {
    return new Promise((res, rej) => {
        setTimeout(function() {
            res(console.log('do I show up before "first"?'))
        }, 100)
    })
}

first()

If your Promise is not synchronous, an await is required.

This is what MDN states "The body of an async function can be thought of as being split by zero or more await expressions. Top-level code, up to and including the first await expression (if there is one), is run synchronously. In this way, an async function without an await expression will run synchronously. If there is an await expression inside the function body, however, the async function will always complete asynchronously."

@starbelly
Copy link
Member

It seems like we've got everything ironed out for the most part now. There's probably lots of little things that can be improved on , but I'm not sure this PR is the place for those anymore. Other little things I believe can be handled in subsequent PRs and I think we can and should do some second passes, but the amount of churn on this PR has peaked IMO and is at least for me becoming harder to follow.
Unless there's something egregious can we move forward with this @ericmj ?

Previously (Remove redundant code) (+27 squashed commits)
Squashed commits:
[0b79c31] Rename as setup-beam
[312b42b] Simplify platform verification
[b43ca96] Prevent use of OTP- prefixed Erlang/OTP versions
[103a236] Move the promise-based approach to an async-based approach

(not testing for failure, so not guaranteeing readable/usable output either)
[1e7f631] Remove local test files
[d03e0c6] Prevent use of -otp- infixed Elixir versions
[697110e] Have versions output in action, not just in tests
[7360781] Ease test validations
[71e6999] Reinstall tests that were there before
[6602f20] Attempt at simplifying regexp matching with build listings
[09247af] Provide for an Elixir to "not OTP" fallback mechanism

(as explained by the comments)
[dfc4083] Attempt at renaming for clarity

We also get rid of return values when not reachable
We also move the `-otp-` part of the Elixir version upstream so it's easy to reason about
  (and update the tests accordingly)
[0d4eb28] Bump our dep.s

(trying to figure out why core.setFailed isn't making the action fail, as it should)
[ebf48ef] Have action fail (with an exception) when no expected version is found

(we otherwise feel that a simple warning is not enough, as it may end up hiding potential bugs)
[8478364] Adapt tests to our actual inputs
[16ea63d] Add prettier again, now sync'ed with jslint

(pass it on the code, already)
[cfc65df] Improve error messages and tests
[a017948] Test unavailable Elixir upon mix
[7f2a3e9] Test failing installations

Also output core.error when expected
[08061ca] Attempt at making shell scripts more robust
[4ee73cb] Separate test code from production code

1. inputs (for CI) are managed by code, not by .yml env. variables
2. rebar3_builds.txt added for stable repeatability
3. tests tweaked to make it easier to modify and drop dependency on production code
4. `dist` regenerated (duplicate files gone)
5. setup-elixir.js tweaked to this new reality
[d17fed4] Remove prettier from the package
[7d6f8f5] Actually break CI when we should
[b972eaf] Remove unrequired element
[0ffa28a] Ease maintenance and readability
[4690169] Fix as per broken tests
[a1371c6] Merge setup-erlang in
@paulo-ferraz-oliveira
Copy link
Collaborator Author

Squashed and force-pushed. Waiting on CI.

@starbelly starbelly merged commit 89cb004 into erlef:main Mar 30, 2021
@paulo-ferraz-oliveira paulo-ferraz-oliveira deleted the adapt-for-rebar3 branch March 30, 2021 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad version results in confusing error message
3 participants