feat: error msg to say missing compiler
See original GitHub issueOverview
Provide a simple overview of what you wish to see added. Please include:
Currently when you don’t have the right compiler installed and you try and run ape test
you get this error
__________________________________________________ ERROR at setup of test_mint ___________________________________________________
owner = <TestAccount 0x1e59ce931B4CFea3fe4B875411e280e173cB7A9C>
project = <ape.managers.project.manager.ProjectManager object at 0x7f9b4f5c1760>
@pytest.fixture(scope="session")
def token(owner, project):
> return owner.deploy(project.Token)
E AttributeError: 'ProjectManager' object has no attribute 'Token'
tests/conftest.py:14: AttributeError
======================================================== warnings summary ========================================================
../../virtualenvs/ape/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191
/home/chris/virtualenvs/ape/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
==================================================== short test summary info =====================================================
ERROR tests/test_token.py::test_initial_state - AttributeError: 'ProjectManager' object has no attribute 'Token'
ERROR tests/test_token.py::test_transfer - AttributeError: 'ProjectManager' object has no attribute 'Token'
ERROR tests/test_token.py::test_transfer_from - AttributeError: 'ProjectManager' object has no attribute 'Token'
ERROR tests/test_token.py::test_approve - AttributeError: 'ProjectManager' object has no attribute 'Token'
ERROR tests/test_token.py::test_mint - AttributeError: 'ProjectManager' object has no attribute 'Token'
============================================ 1 skipped, 1 warning, 5 errors in 0.55s =============================================
(ape) chris@DESKTOP-ID4V0R6 ~/demo/erc20Project $
I would like to fix the error msg and have it say you might a compiler missing?
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
On Compiler Error Messages: What They Say and What ...
In this paper, we focus on compiler error messages. First, related literature is reviewed and the problem placed in the context of the...
Read more >How to fix missing compiler member error Microsoft.CSharp ...
I get a red underline on the word "results" in the second line. I was wondering how to eliminate this error.
Read more >Compiler Error Messages Considered Unhelpful
When an error is not caught, we say that the error is silent, leading to undefined behaviour at run time. Undefined behaviour can...
Read more >No Erlang compile time errors for missing functions
I suspect this is the correct answer but I do have a problem. You are talking about code loading, but I am talking...
Read more >Improve error message for when Injectable() is missing
If component A has a dependency on service B, but service B does not have the Injectable() decorator defined, a vague error message...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Might not work for solidity files, where the file name sometimes doesn’t match the types it contains.
Perhaps just adding a simple “make sure that you have the right compiler plugins installed” or even better: search for files in the
contracts/
folder and see if there are any extensions without a compiler in this situation (and suggest they install one that can handle that file type).refactored this to not require an argument in #1087