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

Invalidate require cache of truffle-config.js #265

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

acuarica
Copy link
Contributor

PR description

This PR closes #262. Essentially duplicates the changes made in trufflesuite/truffle#5728. This means that if trufflesuite/truffle#5728 gets merged we can revert the changes of this PR.

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if documentation updates are required.

Copy link
Contributor

@xhulz xhulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

try {
const originalRequire = eval('require');
// Mimics the behavior of `Config.detect` until https://github.com/trufflesuite/truffle/pull/5728 gets merged.
const file = path.join(args.workingDirectory, 'truffle-config.js');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be a problem if we have the truffle config file with another name?

Copy link
Contributor Author

@acuarica acuarica Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will be an issue, but it's not currently supported. The Config.detect method expects the same name. This is related to #256.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right :)

Thank you @acuarica!

@kevinbluer
Copy link
Member

Hey @acuarica, following our discussion on this I've just done a full smoke test and all looking good 👍

@acuarica acuarica merged commit 6612dde into develop Dec 1, 2022
@acuarica acuarica deleted the fix/invalidate-require-cache branch December 1, 2022 22:33
@acuarica acuarica mentioned this pull request Dec 5, 2022
1 task
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.

Invalidate require cache of truffle-config.js when debugging
3 participants