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

Compile ltest using rebar3 LFE plugin #76

Merged
merged 11 commits into from
Feb 19, 2024
Merged

Conversation

John-Goff
Copy link
Contributor

When attempting to use ltest through mix, mix would get confused that the $REBAR_DEPS_DIR didn't have the stuff that it expected it to have and would fail. This was ultimately due to ltest using lfec directly instead of using the rebar3 plugin. The README states that the plugin is required, so I don't foresee this being a problem, but please try this change out and let me know if there are any issues.

Supersedes #75

Right now ltest does not work on any project trying to use lfe 2.1.3.
Since hex.pm requires semver, and rebar3 supports this, we can relax the
required versions listed in the rebar.config. This allows for this
library to work with any minor version without requiring a version bump
for ltest.
@oubiwann
Copy link
Member

Generally, these are nice changes.

However, there is some history around the use of the testing mechanism in the rebar config itself ... iirc, it was part of a years-long effort to get rid of all the issues around cyclic dependencies that would come up for different people using different deps (or missing some, or having conflicting versions, etc.).

I think we had to remove the ltest dep from rebar3_lfe itself to fix everything everywhere.

I'll take a look at the history and get back to you ...

@oubiwann
Copy link
Member

Yeah, that was it:

@oubiwann
Copy link
Member

Let's figure out how to address the issue you ran into without re-introducing the chance for cyclic deps occurring ...

@John-Goff
Copy link
Contributor Author

Oh I see, I didn't realize the rebar3 plugin also depended on ltest. Let me have a think on this and come back with something. Open to suggestions though!

@John-Goff
Copy link
Contributor Author

Alright, circular dependency solved by removing ltest as a dependency of rebar3_lfe. See lfe/rebar3#88 for that change.

Copy link
Member

@oubiwann oubiwann left a comment

Choose a reason for hiding this comment

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

Okay, let's give this a go and see how it works 😄

@oubiwann
Copy link
Member

Hrm. CI/CD failed on the older versions of Erlang, now that it's pulling in rebar3_ltest. This was due to a bug/missing feature in rebar3 itself around Erlang 26's new way of starting up shells.

I had to comment out Erlang 19 and 20 from rebar3_lfe -- you'll need to do the same here, in your branch for the GH Actions CI/CD yaml file.

Push up that change, and I'll kick off another run ...

@oubiwann
Copy link
Member

NICE!

@oubiwann oubiwann merged commit 197e1e9 into lfex:release/0.13.x Feb 19, 2024
6 checks passed
@John-Goff John-Goff deleted the rebar3 branch March 5, 2024 02:03
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.

2 participants