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

pyln-client: reimplement NodeVersion, simply. #8143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

This broke my build machine, because lightningd --version was malformed (I had no tags somehow in that branch).

I dived into the code to figure out what was wrong, and I was horrified.

  1. STOP. Never write this much code.
  2. You just need a NodeVersion class. That's it. No others.
  3. Don't throw away the entire first part if it starts with 'v'. Just remove the v.
  4. Always fail on invalid strings in the constructor, NOT on the first time you use it.

I have rewritten it.

@rustyrussell rustyrussell added this to the v25.05 milestone Mar 6, 2025
@rustyrussell rustyrussell requested a review from cdecker March 6, 2025 02:36
This broke my build machine, because lightningd --version was malformed
(I had no tags somehow in that branch).

I dived into the code to figure out what was wrong, and I was horrified.

1. STOP.  Never write this much code.
2. You just need a NodeVersion class.  That's it.  No others.
3. Don't throw away the entire first part if it starts with 'v'.  Just remove the v.
4. Always fail on invalid strings in the constructor, NOT on the first time you
   use it.

I have rewritten it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@vincenzopalazzo
Copy link
Contributor

Concept ACK

sad that this code was just landed 8e16cb1 :/

Anyway I agree, what we should do in the future is also simplify the CI we can not fail for just missing a changelog the entire CI like https://github.com/ElementsProject/lightning/actions/runs/13690706239/job/38283309786?pr=8143

What I expect is a bot message in the PR that tells you: "Hey we are defaulting this commit to Changelog-None, if you want to modify the changelog add Changelog-something: something". Anyhow I trust you and your code that is able to pass the Ci ;)

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