compilerCong
lianahus 3 years ago
parent 46c21db813
commit 3bacaf546a
  1. 4
      apps/remix-ide/src/app/tabs/compile-tab.js
  2. 6
      apps/solidity-compiler/src/app/compiler.ts
  3. 6
      libs/remix-lib/src/types/ICompilerApi.ts
  4. 4
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  5. 2
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts

@ -138,10 +138,6 @@ class CompileTab extends CompilerApiMixin(ViewPlugin) { // implements ICompilerA
this.queryParams.update(params)
}
async openFile (path) {
return await this.call('fileManager', 'open', path)
}
async getAppParameter (name) {
return await this.call('config', 'getAppParameter', name)
}

@ -13,7 +13,7 @@ const defaultCompilerParameters = {
evmVersion: null, // compiler default
language: 'Solidity',
useFileConfiguration: false,
configFilePath: "/compiler_config.json"
configFilePath: "compiler_config.json"
}
export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements ICompilerApi {
constructor () {
@ -44,10 +44,6 @@ export class CompilerClientApi extends CompilerApiMixin(PluginClient) implements
}
}
async openFile (path) {
return await PluginClient.call('fileManager', 'open', path)
}
async getAppParameter (name) {
return await PluginClient.call('config', 'getAppParameter', name)
}

@ -14,8 +14,6 @@ export interface ICompilerApi {
getCompilerParameters: () => ConfigurationSettings
setCompilerParameters: (ConfigurationSettings?) => void
openFile: (path: string) => Promise<any>
getAppParameter: (value: string) => Promise<any>
setAppParameter: (name: string, value: string | boolean) => void
@ -59,7 +57,5 @@ export interface ConfigurationSettings {
evmVersion: string,
language: string,
optimize: boolean,
runs: string,
useFileConfiguration: boolean,
configFilePath: string
runs: string
}

@ -26,7 +26,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const [state, setState] = useState({
hideWarnings: false,
autoCompile: false,
configFilePath: "/compiler_config.json",
configFilePath: "compiler_config.json",
useFileConfiguration: false,
matomoAutocompileOnce: true,
optimize: false,
@ -198,7 +198,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
const openFile = async () => {
await api.openFile(state.configFilePath)
api.open(state.configFilePath)
}
const createNewConfigFile = async () => {

@ -48,8 +48,6 @@ export class CompileTabLogic {
this.api.setCompilerParameters({ evmVersion: this.evmVersion })
this.compiler.set('evmVersion', this.evmVersion)
//this.useFileConfiguration = this.api.getCompilerParameters().useFileConfiguration
console.log("logic this.api.getCompilerParameters().configFilePath ", this.api.getCompilerParameters().useFileConfiguration)
this.configFilePath = this.api.getCompilerParameters().configFilePath
this.language = getValidLanguage(this.api.getCompilerParameters().language)
if (this.language != null) {

Loading…
Cancel
Save