File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 8
8
},
9
9
"devDependencies" : {
10
10
"ethereumjs-util" : " ^5.0.1" ,
11
- "solc" : " ^0.4.24" ,
12
11
"standard" : " ^8.4.0" ,
13
12
"swarmhash" : " ^0.1.0"
14
13
},
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const path = require('path')
7
7
const semver = require ( 'semver' )
8
8
const ethUtil = require ( 'ethereumjs-util' )
9
9
const swarmhash = require ( 'swarmhash' )
10
- const solc = require ( 'solc/wrapper ' )
10
+ const cp = require ( 'child_process ' )
11
11
12
12
// This script updates the index files list.js and list.txt in the bin directory,
13
13
// as well as the soljson-latest.js files.
@@ -35,7 +35,10 @@ dirs.forEach(function (dir) {
35
35
}
36
36
37
37
function readBuiltinVersion ( file ) {
38
- return solc ( require ( path . join ( __dirname , '/bin' , file ) ) ) . version ( )
38
+ // NOTE: should be using this, but it leaks memory
39
+ // return solc(require(path.join(__dirname, '/bin', file))).version()
40
+ const filename = path . join ( __dirname , '/bin' , file )
41
+ return cp . execSync ( `/usr/bin/env node -e "console.log(require('${ filename } ').cwrap('version', 'string', [])())"` ) . toString ( ) . trim ( )
39
42
}
40
43
41
44
// ascending list (oldest version first)
You can’t perform that action at this time.
0 commit comments