pull/4346/head
filip mertens 12 months ago
parent 6524350c95
commit 1f60102aae
  1. 1
      apps/remixdesktop/src/plugins/ripgrepPlugin.ts
  2. 14
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  3. 8
      libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx

@ -52,6 +52,7 @@ export class RipgrepPluginClient extends ElectronBasePluginClient {
// replace packed app path with unpacked app path for release on windows
const customRgPath = rgPath.includes('app.asar.unpacked') ? rgPath : rgPath.replace('app.asar', 'app.asar.unpacked')
console.log('customRgPath', customRgPath, path)
const rg = spawn(customRgPath, ['.', '-l', path])
const resultrg: any[] = []

@ -4,18 +4,16 @@ import semver from 'semver'
import {CompilerContainerProps} from './types'
import {ConfigurationSettings} from '@remix-project/remix-lib'
import {checkSpecialChars, CustomTooltip, extractNameFromKey} from '@remix-ui/helper'
import {canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL} from '@remix-project/remix-solidity'
import {canUseWorker, urlFromVersion, pathToURL} from '@remix-project/remix-solidity'
import {compilerReducer, compilerInitialState} from './reducers/compiler'
import {resetEditorMode, listenToEvents} from './actions/compiler'
import {getValidLanguage} from '@remix-project/remix-solidity'
import {CopyToClipboard} from '@remix-ui/clipboard'
import {configFileContent} from './compilerConfiguration'
import axios, {AxiosResponse} from 'axios'
import { AppContext, appPlatformTypes } from '@remix-ui/app'
import './css/style.css'
import { Dropdown } from 'react-bootstrap'
import { hidden } from 'colors'
import { CompilerDropdown } from './components/compiler-dropdown'
const defaultPath = 'compiler_config.json'
@ -56,7 +54,6 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
optimize: false,
compileTimeout: null,
timeout: 300,
//allversions: [],
customVersions: [],
downloaded: [],
compilerLicense: null,
@ -135,6 +132,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}, [])
useEffect(() => {
if(!solJsonBinData) return
if(!state.updatedVersionSelectorFromUrlQuery && solJsonBinData.binList && solJsonBinData.binList.length) {
const versionFromQueryParameter = getSelectVersionFromQueryParam()
if (versionFromQueryParameter.isURL) _updateVersionSelector(state.defaultVersion, versionFromQueryParameter.selectedVersion)
@ -332,7 +330,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
let selectedVersion = state.defaultVersion
let isURL = false
try {
const versions = solJsonBinData.binList
const versions = [...solJsonBinData.binList]
versions.reverse()
if (api.getCompilerQueryParameters().version) {
const versionFromURL = api.getCompilerQueryParameters().version
@ -790,6 +789,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
>
<span className="far fa-file-certificate border-0 p-0 ml-2" onClick={() => showCompilerLicense()}></span>
</CustomTooltip>
{ solJsonBinData && solJsonBinData.binList && solJsonBinData.binList.length > 0 ? (
<CompilerDropdown
allversions={solJsonBinData.selectorList}
customVersions={state.customVersions}
@ -798,7 +798,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
handleLoadVersion={handleLoadVersion}
_shouldBeAdded={_shouldBeAdded}
onlyDownloaded={state.onlyDownloaded}
></CompilerDropdown>
></CompilerDropdown>):null}
</div>
<div className="mb-2 flex-row-reverse remixui_nightlyBuilds custom-control custom-checkbox">
<input className="mr-2 custom-control-input" id="nightlies" type="checkbox" onChange={handleNightliesChange} checked={state.includeNightlies} />

@ -38,13 +38,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
cancelFn: () => { },
handleHide: null
},
solJsonBinData: {
baseURLBin,
baseURLWasm,
binList: [],
wasmList: [],
selectorList: []
},
solJsonBinData: null,
defaultVersion: 'soljson-v0.8.22+commit.4fc1097e.js', // this default version is defined: in makeMockCompiler (for browser test)
})
const [currentVersion, setCurrentVersion] = useState('')

Loading…
Cancel
Save