• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

embark-framework / embark / 6449 / 2
51%
master: 51%

Build:
DEFAULT BRANCH: master
Ran 17 Feb 2021 11:26AM UTC
Files 46
Run time 39s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Feb 2021 11:26AM UTC coverage: 23.401% (-5.8%) from 29.201%
EMBARK_NO_PREPARE=true

cron

travis-ci

Eric Mastro
feat(@embark/core): Recursively import contracts

Add support to recursively import contracts. If we have three contracts

1. A imports B
2. B imports C

Then prior to this PR, contract A would import contract B, and a remapping would be added to the contract so the compiler would know how to find contract B. However, contract B imports contracts C, and because the `parseFileForImport` method was not recursive, the remappings were not able to go one level deeper to remap the path to contract C, and thus the compiler would not know how to locate contract C, and would complain with the error `File outside of allowed directories.`

With the introduction of this PR, the `parseFileForImport` method is now recursive, and so any contract imported is also checked for it's own imports that can be remapped. Specifically, this use case is applicable when there is a dependency containing contracts that imports one of it's own dependency's contracts, ie:

```
pragma solididty ^0.5.0;

import "dependency-1/contract-1.sol";
```
where the dependencies look like:
```
|- node_modules
|--- dependency-1
|----- contract-1.sol <--- contains import "dependency-2/contract-2.sol"
|--- dependency-2
|----- contract-2.sol
```

Add unit tests that verify recursive imports work.
Add embark depdendency that installs a contract used in the recursive unit tests.

7 of 236 branches covered (2.97%)

Branch coverage included in aggregate %.

282 of 999 relevant lines covered (28.23%)

0.33 hits per line

Source Files on job 6449.2 (EMBARK_NO_PREPARE=true)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 23531635
  • Travis Job 6449.2
  • 2613e6d6 on github
  • Prev Job for on master (#4419.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc