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
9b453f7d
Commit
9b453f7d
authored
Jun 30, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing usingWebworker test
parent
a7118fa0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
usingWebWorker.test.ts
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
+2
-5
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+1
-0
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+8
-4
solidity-compiler.tsx
.../remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
+2
-2
index.ts
libs/remix-ui/solidity-compiler/src/lib/types/index.ts
+1
-1
No files found.
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
View file @
9b453f7d
...
...
@@ -32,11 +32,8 @@ module.exports = {
.
clickLaunchIcon
(
'filePanel'
)
.
addFile
(
'basic.sol'
,
sources
[
0
][
'basic.sol'
])
.
clickLaunchIcon
(
'solidity'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'nightlies'
)
as
HTMLInputElement
elem
.
checked
=
true
})
.
waitForElementVisible
(
'[data-id="compilerNightliesBuild"]'
)
.
click
(
'[data-id="compilerNightliesBuild"]'
)
.
noWorkerErrorFor
(
'soljson-v0.3.4+commit.7dab8902.js'
)
.
noWorkerErrorFor
(
'soljson-v0.6.5+commit.f956cc89.js'
)
.
noWorkerErrorFor
(
'soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js'
)
...
...
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
9b453f7d
...
...
@@ -69,6 +69,7 @@ class CompileTab extends ViewPlugin {
this
.
contractMap
=
{}
this
.
isHardHatProject
=
false
this
.
compileErrors
=
{}
this
.
compiledFileName
=
''
this
.
el
=
document
.
createElement
(
'div'
)
this
.
el
.
setAttribute
(
'id'
,
'compileTabView'
)
...
...
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
9b453f7d
...
...
@@ -184,7 +184,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
pragma
=
pragmaStr
.
substring
(
0
,
pragmaStr
.
length
-
1
)
const
releasedVersions
=
state
.
allversions
.
filter
(
obj
=>
!
obj
.
prerelease
).
map
(
obj
=>
obj
.
version
)
const
allVersions
=
state
.
allversions
.
map
(
obj
=>
_retrieveVersion
(
obj
.
version
))
const
currentCompilerName
=
_retrieveVersion
(
/** this._view.versionSelector.selectedOptions[0].label **/
)
const
currentCompilerName
=
_retrieveVersion
(
state
.
selectedVersion
)
// contains only numbers part, for example '0.4.22'
const
pureVersion
=
_retrieveVersion
()
// is nightly build newer than the last release
...
...
@@ -269,7 +269,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
scheduleCompilation
=
()
=>
{
if
(
!
state
.
autoCompile
)
return
if
(
state
.
compileTimeout
)
window
.
clearTimeout
(
state
.
compileTimeout
)
const
compileTimeout
=
window
.
setTimeout
(()
=>
state
.
autoCompile
&&
compile
(),
state
.
timeout
)
const
compileTimeout
=
window
.
setTimeout
(()
=>
{
state
.
autoCompile
&&
compile
()
},
state
.
timeout
)
setState
(
prevState
=>
{
return
{
...
prevState
,
compileTimeout
}
...
...
@@ -286,7 +288,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
const
_retrieveVersion
=
(
version
?)
=>
{
// if (!version) version = this._view.versionSelector.value
if
(
!
version
)
version
=
state
.
selectedVersion
if
(
version
===
'builtin'
)
version
=
state
.
defaultVersion
return
semver
.
coerce
(
version
)
?
semver
.
coerce
(
version
).
version
:
''
}
...
...
@@ -374,6 +377,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
setState
(
prevState
=>
{
return
{
...
prevState
,
selectedVersion
:
value
}
})
updateCurrentVersion
(
value
)
_updateVersionSelector
()
_updateLanguageSelector
()
}
...
...
@@ -493,7 +497,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
</
div
>
<
div
className=
"mb-2 remixui_nightlyBuilds custom-control custom-checkbox"
>
<
input
className=
"mr-2 custom-control-input"
id=
"nightlies"
type=
"checkbox"
onChange=
{
handleNightliesChange
}
checked=
{
state
.
includeNightlies
}
/>
<
label
htmlFor=
"nightlies"
className=
"form-check-label custom-control-label"
>
Include nightly builds
</
label
>
<
label
htmlFor=
"nightlies"
data
-
id=
"compilerNightliesBuild"
className=
"form-check-label custom-control-label"
>
Include nightly builds
</
label
>
</
div
>
<
div
className=
"mb-2"
>
<
label
className=
"remixui_compilerLabel form-check-label"
htmlFor=
"compilierLanguageSelector"
>
Language
</
label
>
...
...
libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
View file @
9b453f7d
...
...
@@ -9,7 +9,7 @@ import { Renderer } from '@remix-ui/renderer'
import
'./css/style.css'
export
const
SolidityCompiler
=
(
props
:
SolidityCompilerProps
)
=>
{
const
{
plugin
,
plugin
:
{
editor
,
config
,
queryParams
,
compileTabLogic
,
c
ompiledFileNam
e
,
fileProvider
,
fileManager
,
contractsDetails
,
contractMap
,
compileErrors
,
isHardHatProject
,
setHardHatCompilation
}
}
=
props
const
{
plugin
,
plugin
:
{
editor
,
config
,
queryParams
,
compileTabLogic
,
c
urrentFil
e
,
fileProvider
,
fileManager
,
contractsDetails
,
contractMap
,
compileErrors
,
isHardHatProject
,
setHardHatCompilation
}
}
=
props
const
[
state
,
setState
]
=
useState
({
contractsDetails
:
{},
eventHandlers
:
{},
...
...
@@ -81,7 +81,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
return
(
<>
<
div
id=
"compileTabView"
>
<
CompilerContainer
editor=
{
editor
}
config=
{
config
}
queryParams=
{
queryParams
}
compileTabLogic=
{
compileTabLogic
}
tooltip=
{
toast
}
modal=
{
modal
}
compiledFileName=
{
c
ompiledFileNam
e
}
setHardHatCompilation=
{
setHardHatCompilation
.
bind
(
plugin
)
}
updateCurrentVersion=
{
updateCurrentVersion
}
isHardHatProject=
{
isHardHatProject
}
/>
<
CompilerContainer
editor=
{
editor
}
config=
{
config
}
queryParams=
{
queryParams
}
compileTabLogic=
{
compileTabLogic
}
tooltip=
{
toast
}
modal=
{
modal
}
compiledFileName=
{
c
urrentFil
e
}
setHardHatCompilation=
{
setHardHatCompilation
.
bind
(
plugin
)
}
updateCurrentVersion=
{
updateCurrentVersion
}
isHardHatProject=
{
isHardHatProject
}
/>
<
ContractSelection
contractMap=
{
contractMap
}
fileProvider=
{
fileProvider
}
fileManager=
{
fileManager
}
contractsDetails=
{
contractsDetails
}
modal=
{
modal
}
/>
<
div
className=
"remixui_errorBlobs p-4"
data
-
id=
"compiledErrors"
>
<
span
data
-
id=
{
`compilationFinishedWith_${currentVersion}`
}
></
span
>
...
...
libs/remix-ui/solidity-compiler/src/lib/types/index.ts
View file @
9b453f7d
...
...
@@ -8,7 +8,7 @@ export interface SolidityCompilerProps {
isHardHatProject
:
boolean
,
queryParams
:
any
,
compileTabLogic
:
any
,
c
ompiledFileNam
e
:
string
,
c
urrentFil
e
:
string
,
contractsDetails
:
Record
<
string
,
any
>
,
editor
:
any
,
config
:
any
,
...
...
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