Skip to content

add support for builder :make -> buildErlangMk#43

Closed
adamcstephens wants to merge 2 commits intocode-supply:mainfrom
adamcstephens:push-txllmxxrnlnw
Closed

add support for builder :make -> buildErlangMk#43
adamcstephens wants to merge 2 commits intocode-supply:mainfrom
adamcstephens:push-txllmxxrnlnw

Conversation

@adamcstephens
Copy link
Contributor

Also handle the error clearly if the builder isn't detected.

@camelpunch
Copy link
Contributor

Would you mind back-filling some tests?

@adamcstephens
Copy link
Contributor Author

Yes, no problem.

@adamcstephens
Copy link
Contributor Author

Are there other cases you'd like to test, or is this simple one enough?

{:hex, name, version, _hash, beam_builders, _sub_deps, _, sha256} = dep.opts[:lock]
fetcher = %FetchHex{pkg: name, version: version, sha256: sha256}

builder =
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no test covering this change. I'd prefer to remove the implementation of this nil check, over having no test. Sorry for being fussy!

Copy link
Contributor Author

@adamcstephens adamcstephens Mar 2, 2026

Choose a reason for hiding this comment

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

I added this because previously the cond below was not matching and the error was very unclear when troubleshooting why deps_nix was crashing. So this is error handling for users and potential new builders being introduced, as no cond clause evaluated to a truthy value provides no indication why its failing and on which dep.

How do you propose to test a code path that calls System.halt?

@adamcstephens
Copy link
Contributor Author

I actually don't care enough about this change to continue. Hence why it took me so long to get back to it. This builder is not popular, and I only added this for a dependency I ended up not using.

@adamcstephens adamcstephens deleted the push-txllmxxrnlnw branch March 2, 2026 18:32
@camelpunch
Copy link
Contributor

OK. Apologies for being a drag on this. Out of interest, what was the dependency?

@adamcstephens
Copy link
Contributor Author

No, it's ok, I apologize as well if that came off poorly. I'm just being honest that I'm not going to spend the time.

I think it was this one: https://hex.pm/packages/dbus

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