fix(solc): remove default include paths (#1691)

* fix path resolution for projects paths passed as included

* fix lookup

* remove default include paths

* remove default include paths usage
This commit is contained in:
Roman Krasiuk 2022-09-14 19:41:25 +03:00 committed by GitHub
parent fd1a844687
commit 62dd635a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -84,15 +84,6 @@ impl ProjectPathsConfig {
paths
}
/// Returns all `--include-path` paths that should be used for this project
///
/// See [IncludePaths]
pub fn include_paths(&self) -> Vec<PathBuf> {
// Note: root must not be included, since it will be used as base-path, which would be a
// conflict
vec![self.sources.clone(), self.tests.clone(), self.scripts.clone()]
}
/// Creates all configured dirs and files
pub fn create_all(&self) -> std::result::Result<(), SolcIoError> {
if let Some(parent) = self.cache.parent() {

View File

@ -804,7 +804,7 @@ impl<T: ArtifactOutput> ProjectBuilder<T> {
artifacts,
ignored_error_codes,
mut allowed_paths,
mut include_paths,
include_paths,
solc_jobs,
offline,
build_info,
@ -823,8 +823,6 @@ impl<T: ArtifactOutput> ProjectBuilder<T> {
// allow every contract under root by default
allowed_paths.insert(paths.root.clone());
// allow paths where contracts are stored by default
include_paths.extend(paths.include_paths());
Ok(Project {
paths,