Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

test: re-use static build directory for caching between test runs #75

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Zolmeister
Copy link

@Zolmeister
Copy link
Author

@gnidan bump

@gnidan
Copy link
Contributor

gnidan commented Nov 24, 2017

LGTM, although @tcoulter could you please also look? I am not sure if there are unknown unknowns here that would cause things to break.

@owocki
Copy link

owocki commented Dec 4, 2017

hey @tcoulter sorry to be a pest, just wanted to let @Zolmeister know what they need to do to push this across the finish line.

@tcoulter
Copy link
Contributor

tcoulter commented Dec 19, 2017

Hi @Zolmeister, sorry for the late response.

Thanks for the submission. This isn't a bad solution, but may potentially be prone to artifact collision if developers have multiple Truffle projects on their machine that they're actively developing. Instead of using an operating-system level, static temp directory, can you refactor to use a temp directory local to the project? Make sure that the folder structure looks like this:

<project directory>
  -> .tmp/
    -> test/
      -> ... .json
      -> ... .json
      -> ... .json

When running your tests, it should use the artifacts in this directory (<project directory>/.tmp/test) if they exist. It should then compile contracts as necessary, even if the test artifacts exist (e.g., some source files may have been updated). Any output from compilation during testing should be written to to this directory.

Again, thanks for your work, and apologies for the late response. Really look forward to your solution!

@owocki
Copy link

owocki commented Dec 21, 2017

hey @Zolmeister -- just making sure you saw the above ☝️

@Zolmeister
Copy link
Author

@tcoulter updated

@owocki
Copy link

owocki commented Jan 2, 2018

happy new year @tcoulter -- let us gitcoiners know if theres anything else we can do here :) cc @benjamincburns

@benjamincburns
Copy link
Contributor

I pinged @gnidan and @tcoulter internally on this, and the consensus was that it looks good, but we might be waiting a bit to merge it, as we'll want it to go out with a major release.

@gnidan
Copy link
Contributor

gnidan commented Jan 16, 2018

@Zolmeister Thank you for the work here! This all looks good. Our plan, like @benjamincburns said, is that this will go out with a major release.

In the meantime, @owocki could you please record this bounty as completed?

Thanks all!

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.

Truffle speed improvements; remove extra compilation from tests
5 participants