Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
02a743a0
Commit
02a743a0
authored
Sep 07, 2021
by
yann300
Committed by
davidzagi93@gmail.com
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compileWithParameters
parent
c4013fd0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
14 deletions
+8
-14
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+0
-4
compiler-api.ts
apps/solidity-compiler/src/app/compiler-api.ts
+7
-10
compiler-utils.ts
libs/remix-solidity/src/compiler/compiler-utils.ts
+1
-0
No files found.
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
02a743a0
...
...
@@ -56,10 +56,6 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
this
.
renderComponent
()
}
setSelectedVersion
(
version
)
{
this
.
selectedVersion
=
version
}
onSetWorkspace
()
{
this
.
renderComponent
()
}
...
...
apps/solidity-compiler/src/app/compiler-api.ts
View file @
02a743a0
...
...
@@ -41,7 +41,6 @@ export const CompilerApiMixin = (Base) => class extends Base {
this
.
compileErrors
=
{}
this
.
compiledFileName
=
''
this
.
selectedVersion
=
''
this
.
currentFile
=
''
}
...
...
@@ -63,10 +62,6 @@ export const CompilerApiMixin = (Base) => class extends Base {
return
this
.
call
(
'terminal'
,
'log'
,
content
)
}
setSelectedVersion
(
version
)
{
this
.
selectedVersion
=
version
}
getCompilationResult
()
{
return
this
.
compileTabLogic
.
compiler
.
state
.
lastCompilationResult
}
...
...
@@ -99,18 +94,20 @@ export const CompilerApiMixin = (Base) => class extends Base {
* @param {object} settings {evmVersion, optimize, runs, version, language}
*/
async
compileWithParameters
(
compilationTargets
,
settings
)
{
settings
.
version
=
settings
.
version
||
this
.
selectedVersion
const
compilerState
=
this
.
getCompilerState
()
settings
.
version
=
settings
.
version
||
compilerState
.
currentVersion
const
res
=
await
compile
(
compilationTargets
,
settings
,
(
url
,
cb
)
=>
this
.
call
(
'contentImport'
,
'resolveAndSave'
,
url
).
then
((
result
)
=>
cb
(
null
,
result
)).
catch
((
error
)
=>
cb
(
error
.
message
)))
return
res
}
// This function is used for passing the compiler configuration to 'remix-tests'
getCurrentCompilerConfig
()
{
const
compilerState
=
this
.
getCompilerState
()
return
{
currentVersion
:
this
.
selected
Version
,
evmVersion
:
this
.
compileTabLogic
.
evmVersion
,
optimize
:
this
.
compileTabLogic
.
optimize
,
runs
:
this
.
compileTabLogic
.
runs
currentVersion
:
compilerState
.
current
Version
,
evmVersion
:
compilerState
.
evmVersion
,
optimize
:
compilerState
.
optimize
,
runs
:
compilerState
.
runs
}
}
...
...
libs/remix-solidity/src/compiler/compiler-utils.ts
View file @
02a743a0
...
...
@@ -22,6 +22,7 @@ export function urlFromVersion (version) {
if
(
!
location
.
endsWith
(
'/'
))
location
+=
'/'
url
=
`
${
location
}
soljson.js`
}
else
{
version
=
version
.
replace
(
'.Emscripten.clang'
,
''
)
if
(
!
version
.
startsWith
(
'soljson-v'
))
version
=
'soljson-v'
+
version
if
(
!
version
.
endsWith
(
'.js'
))
version
=
version
+
'.js'
url
=
`
${
pathToURL
[
version
]}
/
${
version
}
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment