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

profiler requiredSources not working on Windows #4716

Open
cds-amal opened this issue Feb 10, 2022 · 0 comments
Open

profiler requiredSources not working on Windows #4716

cds-amal opened this issue Feb 10, 2022 · 0 comments

Comments

@cds-amal
Copy link
Member

On Windows, truffle compile will always recompile every contract.

versions

OS: Windows 11 (should fail on Windows 10 as well)

PS C:\Users\amal\dev\mc> truffle version
Truffle v5.4.32 (core: 5.4.32)
Solidity v0.5.16 (solc-js)
Node v16.13.1
Web3.js v1.5.3
PS C:\Users\amal\dev\mc>

Reproduction steps

  • truffle unbox metacoin mc
  • cd mc
  • truffle compile
  • truffle compile

You will notice truffle compiles every contract again.

instrumented output

Compare the output between Windows and Linux setting DEBUG=*,-compile:compilerSupplier

Linux (2nd compile)

$ DEBUG=*,-compile:compilerSupplier truffle compile

Compiling your contracts...
===========================
2022-02-10T15:11:21.998Z compile paths: []
2022-02-10T15:11:22.274Z compile invoking profiler
2022-02-10T15:11:22.275Z profiler paths: []
2022-02-10T15:11:22.276Z profiler invoking requiredSources
2022-02-10T15:11:22.277Z profiler:requiredSources allPaths: [
  '/home/amal/.scratch/2022/02/10/test-compile/mc/contracts/ConvertLib.sol',
  '/home/amal/.scratch/2022/02/10/test-compile/mc/contracts/MetaCoin.sol',
  '/home/amal/.scratch/2022/02/10/test-compile/mc/contracts/Migrations.sol'
]
2022-02-10T15:11:22.277Z profiler:requiredSources updatedPaths: []
2022-02-10T15:11:22.277Z compile compilationTargets: []
> Everything is up to date, there is nothing to compile.

Windows (2nd compile)

PS C:\Users\amal\dev\mc> $env:DEBUG = "*,-compile:compileSupplier"
PS C:\Users\amal\dev\mc> truffle compile


Compiling your contracts...
===========================
node.exe : 2022-02-10T15:09:44.760Z compile-vyper paths: [
At C:\Users\amal\AppData\Roaming\npm\truffle.ps1:15 char:3
+   & "node$exe"  "$basedir/node_modules/truffle/build/cli.bundled.js"  ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2022-02-10T15:0...-vyper paths: [:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
  'C:/Users/amal/dev/mc/contracts/ConvertLib.sol',
  'C:/Users/amal/dev/mc/contracts/MetaCoin.sol',
  'C:/Users/amal/dev/mc/contracts/Migrations.sol'
]
2022-02-10T15:09:44.762Z compile-vyper vyperFilesStrict: []
2022-02-10T15:09:44.763Z compile paths: [
  'C:/Users/amal/dev/mc/contracts/ConvertLib.sol',
  'C:/Users/amal/dev/mc/contracts/MetaCoin.sol',
  'C:/Users/amal/dev/mc/contracts/Migrations.sol'
]
2022-02-10T15:09:45.569Z compile invoking profiler
2022-02-10T15:09:45.572Z profiler paths: [
  'C:/Users/amal/dev/mc/contracts/ConvertLib.sol',
  'C:/Users/amal/dev/mc/contracts/MetaCoin.sol',
  'C:/Users/amal/dev/mc/contracts/Migrations.sol'
]
2022-02-10T15:09:45.575Z profiler invoking requiredSources
2022-02-10T15:09:45.576Z profiler:requiredSources allPaths: [
  'C:/Users/amal/dev/mc/contracts/ConvertLib.sol',
  'C:/Users/amal/dev/mc/contracts/MetaCoin.sol',
  'C:/Users/amal/dev/mc/contracts/Migrations.sol'
]
2022-02-10T15:09:45.576Z profiler:requiredSources updatedPaths: [
  'C:/Users/amal/dev/mc/contracts/ConvertLib.sol',
  'C:/Users/amal/dev/mc/contracts/MetaCoin.sol',
  'C:/Users/amal/dev/mc/contracts/Migrations.sol'
]
2022-02-10T15:09:45.577Z profiler:resolveAllSources resolveAllSources called
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants