alloy-rs/svm-rs

feature request: embed the old solc version list into the binary

guanqun opened this issue · 7 comments

Issue: accessing the old solc version requires accessing githubusercontent, which is blocked here in China. And it's unfortunately an operation that's done for every dapptools-rs. (dapp build, dapp test)

Fix: since old solc one is quite static and it won't be modified anymore, I propose we embed it and thus requires no network connection at all.

I can help create PR if it's good to go.

Wow - I admit I did not know about that. @roynalnaruto I'd be supportive of falling back to whatever's installed in $PATH/solc if fetching remotes fails.

it's not exactly about failing to fetch solc. it's about fetching the version list json file. (I should've made it clear).

the current SolcBuilder::new() in dapptools-rs would fetch the whole version list, so that we can compare it later, it involves two network request, one to request the all new solc version list, together with the old version that's less than 0.4.x.

Accessing the new solc version list is fine here, not blocked.
but accessing the old version list is blocked... so I'm suggesting we embed the list to app. It's just a few versions.

Ideally, I'm thinking if we could do a lazy fetching, but you've a logic that once remote is more recent, we should install the latest remote one. that means we have to fetch all remote versions first.

without this being fixed, we lose the feature of being fast. :)

@guanqun Sorry for the late response. I've added a PR (#3 ) and published v0.1.2 for svm-rs