Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Use OpenZeppelin fork of resolver engine (#1066)
Browse files Browse the repository at this point in the history
* Use OpenZeppelin fork of resolver engine

Adds fix to handle Windows-like paths.

Fixes #1049

* Use platform independent path separator
  • Loading branch information
spalladino authored Jul 2, 2019
1 parent 4a3739b commit ed9ecab
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 27 deletions.
77 changes: 56 additions & 21 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"homepage": "https://github.com/zeppelinos/zos/tree/master/packages/cli#readme",
"dependencies": {
"@resolver-engine/core": "^0.3.0",
"@resolver-engine/imports-fs": "^0.3.2",
"@openzeppelin/resolver-engine-core": "^0.3.3",
"@openzeppelin/resolver-engine-imports-fs": "^0.3.3",
"@types/fs-extra": "^7.0.0",
"@types/npm": "^2.0.29",
"@types/semver": "^5.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResolverEngine } from '@resolver-engine/core';
import { ResolverEngine } from '@openzeppelin/resolver-engine-core';
import pathSys from 'path';
import urlSys from 'url';
import { getImports } from '../../../utils/solidity';
Expand Down Expand Up @@ -100,7 +100,7 @@ export async function gatherSources(
const alreadyImported = new Set();

if (workingDir !== '') {
workingDir += '/';
workingDir += pathSys.sep;
}

const absoluteRoots = roots.map(what => resolvePath(workingDir, what));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import path from 'path';
import flatMap from 'lodash.flatmap';
import { Loggy } from 'zos-lib';
import solc, {
Expand Down Expand Up @@ -195,7 +196,7 @@ class SolidityContractsCompiler {
): CompiledContract {
const output = solcOutput.contracts[fileName][contractName];
const source = solcOutput.sources[fileName];
fileName = fileName.substring(fileName.lastIndexOf('/') + 1);
fileName = path.basename(fileName);
const contract = this.contracts.find(
aContract => aContract.fileName === fileName,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
DEFAULT_OPTIMIZER,
DEFAULT_EVM_VERSION,
} from './SolidityContractsCompiler';
import { ImportsFsEngine } from '@resolver-engine/imports-fs';
import { ImportsFsEngine } from '@openzeppelin/resolver-engine-imports-fs';
import { gatherSources } from './ResolverEngineGatherer';
import { SolcBuild } from './CompilerProvider';
import {
Expand Down

0 comments on commit ed9ecab

Please sign in to comment.