Merge branch 'master' into fix-resolver

pull/3262/head
David Disu 2 years ago committed by GitHub
commit 4283a70970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/remix-ide/src/app/panels/terminal.js
  2. 1
      libs/remix-core-plugin/src/lib/compiler-content-imports.ts
  3. 3
      libs/remix-solidity/src/compiler/compiler.ts
  4. 1
      libs/remix-solidity/src/lib/es-web-worker/compiler-worker.ts
  5. 3
      libs/remix-ui/editor/src/lib/providers/definitionProvider.ts
  6. 2
      libs/remix-ui/editor/src/lib/providers/referenceProvider.ts
  7. 1
      libs/remix-ui/editor/src/lib/web-types.ts

@ -121,7 +121,6 @@ class Terminal extends Plugin {
renderComponent () { renderComponent () {
const onReady = (api) => { this.terminalApi = api } const onReady = (api) => { this.terminalApi = api }
console.log(this)
this.dispatch({ this.dispatch({
plugin: this, plugin: this,
onReady: onReady onReady: onReady

@ -123,7 +123,6 @@ export class CompilerImports extends Plugin {
* @returns {Promise} - string content * @returns {Promise} - string content
*/ */
async resolveAndSave (url, targetPath) { async resolveAndSave (url, targetPath) {
console.log('resolveAndSave', url, targetPath)
try { try {
if (targetPath && this.currentRequest) { if (targetPath && this.currentRequest) {
const canCall = await this.askUserPermission('resolveAndSave', 'This action will update the path ' + targetPath) const canCall = await this.askUserPermission('resolveAndSave', 'This action will update the path ' + targetPath)

@ -72,7 +72,6 @@ export class Compiler {
if (typeof (window) !== 'undefined' && Worker) { if (typeof (window) !== 'undefined' && Worker) {
const ESWebWorker = await import('../lib/es-web-worker/es-web-worker-handler') const ESWebWorker = await import('../lib/es-web-worker/es-web-worker-handler')
this.workerHandler = new ESWebWorker.default() this.workerHandler = new ESWebWorker.default()
console.log('worker handler loaded', this.workerHandler)
} }
} }
@ -286,7 +285,6 @@ export class Compiler {
*/ */
loadWorker(url: string): void { loadWorker(url: string): void {
console.log(this)
this.state.worker = this.workerHandler.getWorker() this.state.worker = this.workerHandler.getWorker()
const jobs: Record<'sources', SourceWithTarget>[] = [] const jobs: Record<'sources', SourceWithTarget>[] = []
@ -388,7 +386,6 @@ export class Compiler {
if (m && m in files) continue if (m && m in files) continue
if (this.handleImportCall) { if (this.handleImportCall) {
console.log('calling handleImportCall', this.handleImportCall)
this.handleImportCall(m, (err, content: string) => { this.handleImportCall(m, (err, content: string) => {
if (err && cb) cb(err) if (err && cb) cb(err)
else { else {

@ -8,7 +8,6 @@ self.onmessage = (e: MessageEvent) => {
switch (data.cmd) { switch (data.cmd) {
case 'loadVersion': case 'loadVersion':
{ {
console.log(self);
(self as any).importScripts(data.data) (self as any).importScripts(data.data)
const compiler = setupMethods(self) const compiler = setupMethods(self)
compileJSON = (input) => { compileJSON = (input) => {

@ -29,6 +29,7 @@ export class RemixDefinitionProvider implements monaco.languages.DefinitionProvi
} }
} }
} }
if (jumpLocation && jumpLocation.fileName) {
return [{ return [{
uri: this.monaco.Uri.parse(jumpLocation.fileName), uri: this.monaco.Uri.parse(jumpLocation.fileName),
range: { range: {
@ -39,6 +40,8 @@ export class RemixDefinitionProvider implements monaco.languages.DefinitionProvi
} }
}] }]
} }
return []
}
async jumpToDefinition(position: any) { async jumpToDefinition(position: any) {
const node = await this.props.plugin.call('codeParser', 'definitionAtPosition', position) const node = await this.props.plugin.call('codeParser', 'definitionAtPosition', position)

@ -28,7 +28,7 @@ export class RemixReferenceProvider implements monaco.languages.ReferenceProvide
fileTarget = fileTarget.file fileTarget = fileTarget.file
const fileContent = await this.props.plugin.call('fileManager', 'readFile', fileInNode) const fileContent = await this.props.plugin.call('fileManager', 'readFile', fileInNode)
const lineColumn = await this.props.plugin.call('codeParser', 'getLineColumnOfPosition', position) const lineColumn = await this.props.plugin.call('codeParser', 'getLineColumnOfPosition', position)
console.log(position, fileTarget, lineColumn)
try { try {
this.props.plugin.call('editor', 'addModel', fileTarget, fileContent) this.props.plugin.call('editor', 'addModel', fileTarget, fileContent)
} catch (e) { } catch (e) {

@ -6,7 +6,6 @@ export const loadTypes = async (monaco) => {
// @ts-ignore // @ts-ignore
const ethersAbi = await import('raw-loader!@ethersproject/abi/lib/index.d.ts') const ethersAbi = await import('raw-loader!@ethersproject/abi/lib/index.d.ts')
console.log(ethersAbi)
const ethersAbiDefault = ethersAbi.default.replace(/@ethersproject\//g, '@ethersproject_') const ethersAbiDefault = ethersAbi.default.replace(/@ethersproject\//g, '@ethersproject_')
monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersAbiDefault, `file:///node_modules/@types/@ethersproject_abi/index.d.ts`) monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersAbiDefault, `file:///node_modules/@types/@ethersproject_abi/index.d.ts`)

Loading…
Cancel
Save