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
e5bd5294
Unverified
Commit
e5bd5294
authored
Nov 15, 2019
by
Liana Husikyan
Committed by
GitHub
Nov 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2442 from ethereum/revertMaster
Revert "Merge pull request #2398 from ethereum/compiler_from_pragma"
parents
87b69736
64c7c299
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
compilerContainer.js
src/app/tabs/compileTab/compilerContainer.js
+0
-23
No files found.
src/app/tabs/compileTab/compilerContainer.js
View file @
e5bd5294
...
...
@@ -32,9 +32,6 @@ class CompilerContainer {
* Update the compilation button with the name of the current file
*/
set
currentFile
(
name
=
''
)
{
if
(
name
&&
name
!==
''
)
{
this
.
_setCompilerVersionFromPragma
(
name
)
}
if
(
!
this
.
_view
.
compilationButton
)
return
const
button
=
this
.
compilationButton
(
name
.
split
(
'/'
).
pop
())
yo
.
update
(
this
.
_view
.
compilationButton
,
button
)
...
...
@@ -116,23 +113,6 @@ class CompilerContainer {
return
el
}
_setCompilerVersionFromPragma
(
filename
)
{
this
.
compileTabLogic
.
fileManager
.
getFile
(
filename
).
then
(
data
=>
{
const
pragmaArr
=
data
.
match
(
/
(
pragma solidity
(
.+
?)
;
)
/g
)
if
(
pragmaArr
&&
pragmaArr
.
length
===
1
)
{
const
pragmaStr
=
pragmaArr
[
0
].
replace
(
'pragma solidity'
,
''
).
trim
()
const
pragma
=
pragmaStr
.
substring
(
0
,
pragmaStr
.
length
-
1
)
const
fixedVersions
=
this
.
data
.
allversions
.
filter
(
obj
=>
!
obj
.
prerelease
).
map
(
obj
=>
obj
.
version
)
const
compilerToLoad
=
semver
.
maxSatisfying
(
fixedVersions
,
pragma
)
const
compilerPath
=
this
.
data
.
allversions
.
filter
(
obj
=>
!
obj
.
prerelease
&&
obj
.
version
===
compilerToLoad
)[
0
].
path
if
(
this
.
data
.
selectedVersion
!==
compilerPath
)
{
this
.
data
.
selectedVersion
=
compilerPath
this
.
_updateVersionSelector
()
}
}
})
}
_retrieveVersion
()
{
let
version
=
this
.
_view
.
versionSelector
.
value
return
version
.
substring
(
9
,
version
.
length
)
...
...
@@ -263,9 +243,6 @@ class CompilerContainer {
compile
(
event
)
{
if
(
this
.
config
.
get
(
'currentFile'
))
{
if
(
!
this
.
data
.
selectedVersion
.
includes
(
'nightly'
))
{
this
.
_setCompilerVersionFromPragma
(
this
.
config
.
get
(
'currentFile'
))
}
this
.
compileTabLogic
.
runCompiler
()
}
}
...
...
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