pull/5370/head
filip mertens 2 years ago
parent eeabe2e08c
commit 7089cee743
  1. 4
      libs/remix-core-plugin/src/lib/code-parser.ts
  2. 2
      libs/remix-solidity/package.json
  3. 2
      libs/remix-tests/src/compiler.ts
  4. 7
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
  5. 4
      tsconfig.base.json

@ -4,7 +4,8 @@ import { sourceMappingDecoder } from '@remix-project/remix-debug'
import { CompilerAbstract } from '@remix-project/remix-solidity' import { CompilerAbstract } from '@remix-project/remix-solidity'
import { Compiler } from '@remix-project/remix-solidity' import { Compiler } from '@remix-project/remix-solidity'
import { AstNode, CompilationError, CompilationResult, CompilationSource, helper } from '@remix-project/remix-solidity-ts' import { AstNode, CompilationError, CompilationResult, CompilationSource } from '@remix-project/remix-solidity'
import { helper } from '@remix-project/remix-solidity'
const SolidityParser = (window as any).SolidityParser = (window as any).SolidityParser || [] const SolidityParser = (window as any).SolidityParser = (window as any).SolidityParser || []
const profile = { const profile = {
@ -104,6 +105,7 @@ export class CodeParser extends Plugin {
console.log('lineColumn', lineColumn) console.log('lineColumn', lineColumn)
allErrors.push({ error, lineColumn }) allErrors.push({ error, lineColumn })
} }
console.log('allErrors', allErrors)
await this.call('editor', 'addErrorMarker', allErrors) await this.call('editor', 'addErrorMarker', allErrors)
} else { } else {
await this.call('editor', 'clearErrorMarkers', result.getSourceCode().sources) await this.call('editor', 'clearErrorMarkers', result.getSourceCode().sources)

@ -1,5 +1,5 @@
{ {
"name": "@remix-project/remix-solidity-ts", "name": "@remix-project/remix-solidity",
"version": "0.5.0", "version": "0.5.0",
"description": "Tool to load and run Solidity compiler", "description": "Tool to load and run Solidity compiler",
"main": "src/index.js", "main": "src/index.js",

@ -3,7 +3,7 @@ import async from 'async'
import path from 'path' import path from 'path'
import deepequal from 'deep-equal' import deepequal from 'deep-equal'
import Log from './logger' import Log from './logger'
import { Compiler as RemixCompiler } from '@remix-project/remix-solidity-ts' import { Compiler as RemixCompiler } from '@remix-project/remix-solidity'
import { SrcIfc, CompilerConfiguration, CompilationErrors } from './types' import { SrcIfc, CompilerConfiguration, CompilationErrors } from './types'
const logger = new Log() const logger = new Log()
const log = logger.logger const log = logger.logger

@ -370,9 +370,14 @@ export const EditorUI = (props: EditorUIProps) => {
filePath = fileFromUrl.file filePath = fileFromUrl.file
const model = editorModelsState[filePath]?.model const model = editorModelsState[filePath]?.model
const errorServerityMap = {
'error': MarkerSeverity.Error,
'warning': MarkerSeverity.Warning,
'info': MarkerSeverity.Info
}
if (model) { if (model) {
const markerData: monaco.editor.IMarkerData = { const markerData: monaco.editor.IMarkerData = {
severity: MarkerSeverity.Error, severity: errorServerityMap[marker.severity],
startLineNumber: lineColumn.start.line + 1, startLineNumber: lineColumn.start.line + 1,
startColumn: lineColumn.start.column + 1, startColumn: lineColumn.start.column + 1,
endLineNumber: lineColumn.end.line + 1, endLineNumber: lineColumn.end.line + 1,

@ -10,7 +10,7 @@
"importHelpers": true, "importHelpers": true,
"target": "es2015", "target": "es2015",
"module": "commonjs", "module": "commonjs",
"typeRoots": ["node_modules/@types"], "typeRoots": ["node_modules/@types", "dist/libs/**/*.d.ts"],
"lib": ["es2017", "es2019", "dom"], "lib": ["es2017", "es2019", "dom"],
"skipLibCheck": true, "skipLibCheck": true,
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true,
@ -28,7 +28,7 @@
"dist/libs/remix-simulator/src/index.js" "dist/libs/remix-simulator/src/index.js"
], ],
"@remix-project/remix-solidity": [ "@remix-project/remix-solidity": [
"dist/libs/remix-solidity/src/index.js" "dist/libs/remix-solidity/src/index"
], ],
"@remix-project/remix-tests": ["dist/libs/remix-tests/src/index.js"], "@remix-project/remix-tests": ["dist/libs/remix-tests/src/index.js"],
"@remix-project/remix-url-resolver": [ "@remix-project/remix-url-resolver": [

Loading…
Cancel
Save