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
9ab13daa
Commit
9ab13daa
authored
Aug 10, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix local compiler
parent
f7c6ac36
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
compiler-utils.ts
libs/remix-solidity/src/compiler/compiler-utils.ts
+3
-0
compiler-container.tsx
...remix-ui/solidity-compiler/src/lib/compiler-container.tsx
+2
-1
No files found.
libs/remix-solidity/src/compiler/compiler-utils.ts
View file @
9ab13daa
...
@@ -22,6 +22,9 @@ export function urlFromVersion (version) {
...
@@ -22,6 +22,9 @@ export function urlFromVersion (version) {
* checks a compiler whitelist, browser support and OS.
* checks a compiler whitelist, browser support and OS.
*/
*/
export
function
canUseWorker
(
selectedVersion
)
{
export
function
canUseWorker
(
selectedVersion
)
{
if
(
selectedVersion
.
startsWith
(
'http'
))
{
return
browserSupportWorker
()
}
const
version
=
semver
.
coerce
(
selectedVersion
)
const
version
=
semver
.
coerce
(
selectedVersion
)
if
(
!
version
)
{
if
(
!
version
)
{
return
browserSupportWorker
()
return
browserSupportWorker
()
...
...
libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
View file @
9ab13daa
...
@@ -138,7 +138,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
...
@@ -138,7 +138,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
// fetching both normal and wasm builds and creating a [version, baseUrl] map
// fetching both normal and wasm builds and creating a [version, baseUrl] map
const
fetchAllVersion
=
async
(
callback
)
=>
{
const
fetchAllVersion
=
async
(
callback
)
=>
{
let
selectedVersion
,
allVersionsWasm
,
isURL
let
selectedVersion
,
allVersionsWasm
,
isURL
let
allVersions
=
[{
path
:
'builtin'
,
longVersion
:
'latest local version -
0.7.4'
}]
let
allVersions
=
[{
path
:
'builtin'
,
longVersion
:
'latest local version -
'
+
state
.
defaultVersion
}]
// fetch normal builds
// fetch normal builds
const
binRes
:
any
=
await
promisedMiniXhr
(
`
${
baseURLBin
}
/list.json`
)
const
binRes
:
any
=
await
promisedMiniXhr
(
`
${
baseURLBin
}
/list.json`
)
// fetch wasm builds
// fetch wasm builds
...
@@ -350,6 +350,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
...
@@ -350,6 +350,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
// Workers cannot load js on "file:"-URLs and we get a
// Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case.
// resort to non-worker version in that case.
if
(
selectedVersion
===
'builtin'
)
selectedVersion
=
state
.
defaultVersion
if
(
selectedVersion
!==
'builtin'
&&
canUseWorker
(
selectedVersion
))
{
if
(
selectedVersion
!==
'builtin'
&&
canUseWorker
(
selectedVersion
))
{
compileTabLogic
.
compiler
.
loadVersion
(
true
,
url
)
compileTabLogic
.
compiler
.
loadVersion
(
true
,
url
)
}
else
{
}
else
{
...
...
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