Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce transformation pipeline for compilation source files #78

Closed
0x-r4bbit opened this issue Jul 2, 2019 · 0 comments · Fixed by #85
Closed

Introduce transformation pipeline for compilation source files #78

0x-r4bbit opened this issue Jul 2, 2019 · 0 comments · Fixed by #85
Assignees
Projects
Milestone

Comments

@0x-r4bbit
Copy link
Owner

Is your feature request related to a problem? Please describe.
Tools like Truffle and Embark support special syntaxes for imports inside of Solidity Smart Contracts. For example:

import 'openzeppelin/contracts/SomeContract'

Will actually import the Smart Contract from a library that lives inside node_modules, assuming that there's not file with the same path/name relative to the source file.

A lot of projects make use of this and similar syntax. Embark even fetches files if the import path is a remote path (something that can be done with Solidity's built-in module:path syntax as well).

This is a crucial feature to make vibranium usable for a lot of projects.

Describe the solution you'd like
This needs to be explored, but essentially, the idea would be to take the specified source files pass them through a transformation pipeline which will output the modified source somewhere inside the project's .vibranium folder and then have the compiler pick up the source files from there.

@0x-r4bbit 0x-r4bbit added this to the Reinforcement milestone Jul 2, 2019
@0x-r4bbit 0x-r4bbit self-assigned this Jul 2, 2019
@0x-r4bbit 0x-r4bbit added this to Inbox in Vibranium via automation Jul 2, 2019
@0x-r4bbit 0x-r4bbit moved this from Inbox to In progress in Vibranium Jul 7, 2019
0x-r4bbit added a commit that referenced this issue Aug 19, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 21, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 21, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
Vibranium automation moved this from In progress to Done Aug 28, 2019
0x-r4bbit added a commit that referenced this issue Aug 28, 2019
This commit enables vibranium to resolve smart imports when the Solidity
compiler is used. Namely, this means users can use the follow import syntax
to import from `node_modules`:

```
import "@aragon/contracts/something.sol"
```
This works as well with relative paths:
```
import "../node_modules/@aragon/contracts/something.sol"
```

In addition to that, it enables importing source files from outside the vibranium
project as well.

One thing to note is that there are inconcistencies between the `solc` and `solcjs`
implementations (ethereum/solc-js#377) that lead to `solcjs`
not properly resolving paths unless they are all supplied and match exactly the import
paths used in source files.

This causes Vibranium to completely canonicalize all file paths it's working
with when it comes to resolving import paths.

Closes #78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Vibranium
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant