Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

refactor(solc): remappings detection rewrite #732

Merged
merged 2 commits into from
Dec 25, 2021

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Dec 24, 2021

Motivation

Fix #728

Solution

New approach to detect remappings for a variety of patterns

  • keep track of a valid window while recursively scanning dirs for candidates. A new window, is opened after a new lib dir was found (lib, node_modules): lib/solmate/lib/weird-erc20, contains 2 windows (solmate, weird-erc20). this also allows us to merge multiple candidates in the same window like in oz/{auth, tokens,..}/contracts auth and tokens are contained in the same window oz and should be merged to oz

This is a better-structured version, which also handles all edge cases we're currently aware of, once we discover new ones, they can be easily added

Integration tests pass on foundry foundry-rs/foundry#305

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst gakonst merged commit 918063d into gakonst:master Dec 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stabilize Remappings auto detection
2 participants