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

Merge develop -> master for Truffle 4 release #32

Merged
merged 35 commits into from
Oct 31, 2017
Merged

Merge develop -> master for Truffle 4 release #32

merged 35 commits into from
Oct 31, 2017

Conversation

gnidan
Copy link
Contributor

@gnidan gnidan commented Oct 31, 2017

gnidan and others added 30 commits July 27, 2017 17:57
Merge `master` into `develop`
Ignore yarn.lock _for now_ until we standardize our development process
around it, or choose a different method of managing our packages and
repositories.
Previous code that fixed file paths on Windows broke package imports
for everybody. :(
I came here to handle the changes to the schema, namely that
`updated_at` is now `updatedAt`. This is an easy change.

While I was here decided to also fix truffle/#444 and truffle/#368.
This was because the profiler was only comparing the modified times of
files within the contracts directory. The new schema changes —
specifically the inclusion of `sourcePath` — lets us check whether
everything has been updated, no matter where it lives.

This new method works backwards, combining all the files passed into
the profiler with all the contract artifacts already compiled. After
creating a list of all files necessary (again, the files requested to
be compiled as well as artifacts and their associated source paths), it
checks the modified times of all the source files against the
artifact’s modified time, creating a list of which new files have been
updated. Note that one source file may have many artifact files
(multiple contracts per file).

There’s a rare edge case where if a file lives outside of the contracts
directory and is deleted, but has already been compiled once, the
compiler won’t try to compile everything again (thus, it won’t error,
even though the dependent file was removed). This is because the
contract artifact exists but the source file does not. In this case we
choose *not* to error because if we did, it would cause all old
contract artifacts to be showstoppers of compilation, and it’s not our
business to delete old contract artifacts (users may want to keep them,
for some reason). So for now, we’re not going to error in this case,
and we’re going to leave it up to the user to manage their excess
artifacts.
Fix typo compiliation > compilation
Include compiler information in contract definition
@gnidan gnidan merged commit 6fa455d into master Oct 31, 2017
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.

3 participants