File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ Supported `polkadot-sdk` rev:`c29e72a8628835e34deb6aa7db9a78a2e4eabcee`
88
99### Added
1010- Support for solc v0.8.29
11+ - ` --supported-solc-versions ` for ` resolc ` binary to return a ` semver ` range of supported ` solc ` versions.
1112
1213### Changed
1314- Runner ` resolc ` using webkit is no longer supported.
Original file line number Diff line number Diff line change @@ -44,8 +44,11 @@ pub use self::solc::standard_json::output::contract::Contract as SolcStandardJso
4444pub use self :: solc:: standard_json:: output:: Output as SolcStandardJsonOutput ;
4545pub use self :: solc:: version:: Version as SolcVersion ;
4646pub use self :: solc:: Compiler ;
47+ pub use self :: solc:: FIRST_SUPPORTED_VERSION as SolcFirstSupportedVersion ;
48+ pub use self :: solc:: LAST_SUPPORTED_VERSION as SolcLastSupportedVersion ;
4749pub use self :: version:: Version as ResolcVersion ;
4850pub use self :: warning:: Warning ;
51+
4952#[ cfg( not( target_os = "emscripten" ) ) ]
5053pub mod test_utils;
5154pub mod tests;
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ pub struct Arguments {
1919 #[ arg( long = "version" ) ]
2020 pub version : bool ,
2121
22+ /// Print supported `solc` versions and exit.
23+ #[ arg( long = "supported-solc-versions" ) ]
24+ pub supported_solc_versions : bool ,
25+
2226 /// Print the licence and exit.
2327 #[ arg( long = "license" ) ]
2428 pub license : bool ,
@@ -171,6 +175,12 @@ impl Arguments {
171175 anyhow:: bail!( "No other options are allowed while getting the compiler version." ) ;
172176 }
173177
178+ if self . supported_solc_versions && std:: env:: args ( ) . count ( ) > 2 {
179+ anyhow:: bail!(
180+ "No other options are allowed while getting the supported `solc` versions."
181+ ) ;
182+ }
183+
174184 #[ cfg( debug_assertions) ]
175185 if self . recursive_process_input . is_some ( ) && !self . recursive_process {
176186 anyhow:: bail!( "--process-input can be only used when --recursive-process is given" ) ;
Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ fn main_inner() -> anyhow::Result<()> {
4141 return Ok ( ( ) ) ;
4242 }
4343
44+ if arguments. supported_solc_versions {
45+ writeln ! (
46+ std:: io:: stdout( ) ,
47+ ">={},<={}" ,
48+ revive_solidity:: SolcFirstSupportedVersion ,
49+ revive_solidity:: SolcLastSupportedVersion ,
50+ ) ?;
51+ return Ok ( ( ) ) ;
52+ }
53+
4454 if arguments. license {
4555 let license_mit = include_str ! ( "../../../../LICENSE-MIT" ) ;
4656 let license_apache = include_str ! ( "../../../../LICENSE-APACHE" ) ;
You can’t perform that action at this time.
0 commit comments