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
9e3fe553
Commit
9e3fe553
authored
Oct 18, 2021
by
bunsenstraat
Browse files
Options
Browse Files
Download
Plain Diff
timeout unit test
parents
b63fcc9b
13f961da
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
15 deletions
+35
-15
analysis-tab.js
apps/remix-ide/src/app/tabs/analysis-tab.js
+5
-1
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+9
-1
remixAppManager.js
apps/remix-ide/src/remixAppManager.js
+1
-1
run.ts
libs/remix-tests/src/run.ts
+1
-1
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+17
-10
remixd.ts
libs/remixd/src/bin/remixd.ts
+2
-1
No files found.
apps/remix-ide/src/app/tabs/analysis-tab.js
View file @
9e3fe553
...
...
@@ -39,7 +39,11 @@ class AnalysisTab extends ViewPlugin {
}
}
onActivation
()
{
async
onActivation
()
{
const
isSolidityActive
=
await
this
.
call
(
'manager'
,
'isActive'
,
'solidity'
)
if
(
!
isSolidityActive
)
{
await
this
.
call
(
'manager'
,
'activatePlugin'
,
'solidity'
)
}
this
.
renderComponent
()
}
...
...
apps/remix-ide/src/app/tabs/test-tab.js
View file @
9e3fe553
...
...
@@ -48,6 +48,7 @@ module.exports = class TestTab extends ViewPlugin {
appManager
.
event
.
on
(
'activate'
,
(
name
)
=>
{
if
(
name
===
'solidity'
)
this
.
updateRunAction
()
console
.
log
(
'solidity is activated'
)
})
appManager
.
event
.
on
(
'deactivate'
,
(
name
)
=>
{
if
(
name
===
'solidity'
)
this
.
updateRunAction
()
...
...
@@ -74,6 +75,14 @@ module.exports = class TestTab extends ViewPlugin {
}
}
async
onActivation
()
{
const
isSolidityActive
=
await
this
.
call
(
'manager'
,
'isActive'
,
'solidity'
)
if
(
!
isSolidityActive
)
{
await
this
.
call
(
'manager'
,
'activatePlugin'
,
'solidity'
)
}
this
.
updateRunAction
()
}
onDeactivation
()
{
this
.
off
(
'filePanel'
,
'newTestFileCreated'
)
this
.
off
(
'filePanel'
,
'setWorkspace'
)
...
...
@@ -637,7 +646,6 @@ module.exports = class TestTab extends ViewPlugin {
el
.
setAttribute
(
'title'
,
'No solidity file selected'
)
}
else
{
el
.
setAttribute
(
'title'
,
'The "Solidity Plugin" should be activated'
)
// @todo(#2747) we can activate the plugin here
}
}
if
(
!
this
.
runActionElement
)
{
...
...
apps/remix-ide/src/remixAppManager.js
View file @
9e3fe553
...
...
@@ -14,7 +14,7 @@ const requiredModules = [ // services + layout views + system views
const
dependentModules
=
[
'git'
,
'hardhat'
]
// module which shouldn't be manually activated (e.g git is activated by remixd)
export
function
isNative
(
name
)
{
const
nativePlugins
=
[
'vyper'
,
'workshops'
,
'debugger'
,
'remixd'
,
'menuicons'
,
'solidity'
,
'hardhat-provider'
]
const
nativePlugins
=
[
'vyper'
,
'workshops'
,
'debugger'
,
'remixd'
,
'menuicons'
,
'solidity'
,
'hardhat-provider'
,
'solidityStaticAnalysis'
,
'solidityUnitTesting'
]
return
nativePlugins
.
includes
(
name
)
||
requiredModules
.
includes
(
name
)
}
...
...
libs/remix-tests/src/run.ts
View file @
9e3fe553
...
...
@@ -82,7 +82,7 @@ commander
const
baseURL
=
'https://binaries.soliditylang.org/wasm/'
const
response
:
AxiosResponse
=
await
axios
.
get
(
baseURL
+
'list.json'
)
const
{
releases
,
latestRelease
}
=
response
.
data
const
compString
=
releases
[
compVersion
]
const
compString
=
releases
?
releases
[
compVersion
]
:
null
if
(
!
compString
)
{
log
.
error
(
`No compiler found in releases with version
${
compVersion
}
`
)
process
.
exit
()
...
...
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
9e3fe553
...
...
@@ -23,6 +23,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
[
state
,
setState
]
=
useState
({
hideWarnings
:
false
,
autoCompile
:
false
,
matomoAutocompileOnce
:
true
,
optimize
:
false
,
compileTimeout
:
null
,
timeout
:
300
,
...
...
@@ -69,7 +70,6 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
optimize
=
params
.
optimize
const
runs
=
params
.
runs
as
string
const
evmVersion
=
params
.
evmVersion
return
{
...
prevState
,
hideWarnings
:
api
.
getAppParameter
(
'hideWarnings'
)
as
boolean
||
false
,
...
...
@@ -135,6 +135,12 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
},
[
configurationSettings
])
const
_retrieveVersion
=
(
version
?)
=>
{
if
(
!
version
)
version
=
state
.
selectedVersion
if
(
version
===
'builtin'
)
version
=
state
.
defaultVersion
return
semver
.
coerce
(
version
)
?
semver
.
coerce
(
version
).
version
:
''
}
// fetching both normal and wasm builds and creating a [version, baseUrl] map
const
fetchAllVersion
=
async
(
callback
)
=>
{
let
selectedVersion
,
allVersionsWasm
,
isURL
...
...
@@ -281,7 +287,14 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
compileIcon
.
current
.
setAttribute
(
'title'
,
'idle'
)
compileIcon
.
current
.
classList
.
remove
(
'remixui_spinningIcon'
)
compileIcon
.
current
.
classList
.
remove
(
'remixui_bouncingIcon'
)
_paq
.
push
([
'trackEvent'
,
'compiler'
,
'compiled_with_version'
,
_retrieveVersion
()])
if
(
!
state
.
autoCompile
||
(
state
.
autoCompile
&&
state
.
matomoAutocompileOnce
))
{
_paq
.
push
([
'trackEvent'
,
'compiler'
,
'compiled_with_version'
,
_retrieveVersion
()])
if
(
state
.
autoCompile
&&
state
.
matomoAutocompileOnce
)
{
setState
(
prevState
=>
{
return
{
...
prevState
,
matomoAutocompileOnce
:
false
}
})
}
}
}
const
scheduleCompilation
=
()
=>
{
...
...
@@ -305,12 +318,6 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
compileTabLogic
.
runCompiler
(
hhCompilation
)
}
const
_retrieveVersion
=
(
version
?)
=>
{
if
(
!
version
)
version
=
state
.
selectedVersion
if
(
version
===
'builtin'
)
version
=
state
.
defaultVersion
return
semver
.
coerce
(
version
)
?
semver
.
coerce
(
version
).
version
:
''
}
const
_updateVersionSelector
=
(
version
,
customUrl
=
''
)
=>
{
// update selectedversion of previous one got filtered out
let
selectedVersion
=
version
...
...
@@ -384,7 +391,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const
handleLoadVersion
=
(
value
)
=>
{
setState
(
prevState
=>
{
return
{
...
prevState
,
selectedVersion
:
value
}
return
{
...
prevState
,
selectedVersion
:
value
,
matomoAutocompileOnce
:
true
}
})
updateCurrentVersion
(
value
)
_updateVersionSelector
(
value
)
...
...
@@ -405,7 +412,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
api
.
setAppParameter
(
'autoCompile'
,
checked
)
checked
&&
compile
()
setState
(
prevState
=>
{
return
{
...
prevState
,
autoCompile
:
checked
}
return
{
...
prevState
,
autoCompile
:
checked
,
matomoAutocompileOnce
:
state
.
matomoAutocompileOnce
||
checked
}
})
}
...
...
libs/remixd/src/bin/remixd.ts
View file @
9e3fe553
...
...
@@ -156,7 +156,8 @@ function errorHandler (error: any, service: string) {
console
.
error
(
e
)
}
return
data
.
includes
(
origin
)
?
data
.
includes
(
origin
)
:
data
.
includes
(
domain
)
const
dataArray
:
string
[]
=
data
return
dataArray
.
includes
(
origin
)
?
dataArray
.
includes
(
origin
)
:
dataArray
.
includes
(
domain
)
}
catch
(
e
)
{
try
{
// eslint-disable-next-line
...
...
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