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

Make 4.+ use the latest 4.x release? #1920

Open
sixcorners opened this issue Jan 28, 2025 · 1 comment
Open

Make 4.+ use the latest 4.x release? #1920

sixcorners opened this issue Jan 28, 2025 · 1 comment
Labels
ideas Some idea/suggestion around jbang behavior/feature set

Comments

@sixcorners
Copy link

sixcorners commented Jan 28, 2025

Is your feature request related to a problem? Please describe.
I would be nice if I could specify the version as 4.+ and have it not go to 5. Maybe 4+ could still go to 5. Same for 4.12.+ using 4.12.x versions but not anything 5.x.

Describe the solution you'd like
The version that DEPS find when using + is tweaked slightly.

Describe alternatives you've considered
I currently just specify the full version

Additional context
Here is an example of a program that breaks if the version is switched to 4.+. 5.0.0 gets used which is old.

///usr/bin/env jbang --enable-preview "$0" "$@" ; exit $?
//DEPS org.web3j:core:4.12.3
//DEPS org.slf4j:slf4j-jdk14:2.+

import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.DefaultBlockParameter;
import org.web3j.protocol.core.DefaultBlockParameterName;
import org.web3j.protocol.http.HttpService;

import java.math.BigInteger;

void main(String... args) throws Exception {
    DefaultBlockParameter block = DefaultBlockParameterName.LATEST;
    if (args.length == 1) block = DefaultBlockParameter.valueOf(new BigInteger(args[0]));
    // https://chainlist.org/chain/1
    try (var web3 = Web3j.build(new HttpService("https://rpc.mevblocker.io", true))) {
        var resp = web3.ethGetBlockByNumber(block, true).send();
        System.out.printf("%s%n", resp.getRawResponse());
    }
}

see hyperledger-web3j/web3j#1976

@sixcorners sixcorners added the ideas Some idea/suggestion around jbang behavior/feature set label Jan 28, 2025
@sixcorners
Copy link
Author

For some reason org.slf4j:slf4j-jdk14:1.+ goes to org.slf4j:slf4j-jdk14:jar:1.1.0-RC0 when I think it should be 1.7.36 at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ideas Some idea/suggestion around jbang behavior/feature set
Projects
None yet
Development

No branches or pull requests

1 participant