{"action":"created","issue":{"url":"https://api.github.com/repos/trufflesuite/truffle/issues/700","repository_url":"https://api.github.com/repos/trufflesuite/truffle","labels_url":"https://api.github.com/repos/trufflesuite/truffle/issues/700/labels{/name}","comments_url":"https://api.github.com/repos/trufflesuite/truffle/issues/700/comments","events_url":"https://api.github.com/repos/trufflesuite/truffle/issues/700/events","html_url":"https://github.com/trufflesuite/truffle/issues/700","id":279172203,"node_id":"MDU6SXNzdWUyNzkxNzIyMDM=","number":700,"title":"Files imported from the test directory cannot find already generated artifacts","user":{"login":"VoR0220","id":7756785,"node_id":"MDQ6VXNlcjc3NTY3ODU=","avatar_url":"https://avatars2.githubusercontent.com/u/7756785?v=4","gravatar_id":"","url":"https://api.github.com/users/VoR0220","html_url":"https://github.com/VoR0220","followers_url":"https://api.github.com/users/VoR0220/followers","following_url":"https://api.github.com/users/VoR0220/following{/other_user}","gists_url":"https://api.github.com/users/VoR0220/gists{/gist_id}","starred_url":"https://api.github.com/users/VoR0220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoR0220/subscriptions","organizations_url":"https://api.github.com/users/VoR0220/orgs","repos_url":"https://api.github.com/users/VoR0220/repos","events_url":"https://api.github.com/users/VoR0220/events{/privacy}","received_events_url":"https://api.github.com/users/VoR0220/received_events","type":"User","site_admin":false},"labels":[{"id":1120350502,"node_id":"MDU6TGFiZWwxMTIwMzUwNTAy","url":"https://api.github.com/repos/trufflesuite/truffle/labels/stale","name":"stale","color":"ffffff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-12-04T22:21:13Z","updated_at":"2018-11-15T09:09:55Z","closed_at":null,"author_association":"NONE","body":"- [x] I've asked for help in the [Truffle Gitter](http://gitter.im/Consensys/truffle) before filing this issue.\r\n\r\n---------------------------\r\n\r\n## Issue\r\n\r\nWhenever there is a file imported into a test file when running `truffle test`, and the contract object itself doesn't match the file name, truffle complains that it cannot find the artifacts.\r\n\r\n## Steps to Reproduce\r\n\r\nTake your standard owned contract:\r\n\r\n```\r\npragma solidity ^0.4.16;\r\n\r\ncontract owned {\r\n    function owned() public { owner = msg.sender; }\r\n    address owner;\r\n\r\n    // This contract only defines a modifier but does not use\r\n    // it - it will be used in derived contracts.\r\n    // The function body is inserted where the special symbol\r\n    // \"_;\" in the definition of a modifier appears.\r\n    // This means that if the owner calls this function, the\r\n    // function is executed and otherwise, an exception is\r\n    // thrown.\r\n    modifier onlyOwner {\r\n        require(msg.sender == owner);\r\n        _;\r\n    }\r\n\r\n    function changeOwner(address newOwner) public onlyOwner {\r\n        owner = newOwner;\r\n    }\r\n}\r\n```\r\n- put it into the contracts directory under the filename \"Utils.sol\".\r\n- use it in a contract (inherit the owned principle into some Widget contract). \r\n- create a TestWidget.sol contract in the test directory. Import the Widget contract. \r\n- Try to run `truffle test`\r\n\r\n## Expected Behavior\r\n\r\nIt should be able to find it based on the artifacts in the build directory by scanning through each of the artifacts and looking to the sourcePath key in all of the artifacts to see if it matches...or it could just recompile. Whichever you think works best given the project needs. \r\n\r\n## Actual Results\r\n\r\n```\r\n  1) TestRoleManager \"before all\" hook: prepare suite:\r\n     Error: Could not find artifacts for /Users/vor0220/itpeople/fit-repo-bitbucket/contracts/Utils.sol from any sources\r\n```\r\n\r\n## Environment\r\n\r\n* Operating System: OS X High Sierra 10.13.1\r\n* Truffle version: v4.0.1\r\n* Ethereum client: Ganache I suppose?\r\n* node version: v8.0.0\r\n* npm version: 5.5.1\r\n"},"comment":{"url":"https://api.github.com/repos/trufflesuite/truffle/issues/comments/438969472","html_url":"https://github.com/trufflesuite/truffle/issues/700#issuecomment-438969472","issue_url":"https://api.github.com/repos/trufflesuite/truffle/issues/700","id":438969472,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODk2OTQ3Mg==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-15T09:09:55Z","updated_at":"2018-11-15T09:09:55Z","author_association":"NONE","body":"There has been no new activity on this issue since it was marked as stale 7 days ago, so it is being automatically closed.  If you'd like help with this or a different problem, please open a new issue. Thanks!\n"}}
{"actor":{"display_login":"stale"}}