Comments (4)
You say that you execute the same command line that EOSFactory uses and you get the different warning message.
I cannot reproduce this effect.
from eosfactory.
OK, now I see the point. I will elaborate it.
from eosfactory.
Thank you for pointing at the bad mistake. I have corrected it. If you do not want to wait for the next edition of EOSFactory, and if you use a GitHub cloned repository, you can correct the file eosfactory/core/utils.py
:
@@ -139,7 +139,7 @@ error message:
139 139 if cwd:
140 140 shutil.rmtree(cwd)
141 141
142 - if returncode:
142 + if returncode or stderr:
143 143 raise errors.Error('''
144 144 command line:
145 145 =============
Now, EOSFactory throws an exception:
ERROR:
command line:
=============
eosio-cpp -o /mnt/c/Workspaces/EOS/contracts/token/build/token.wasm -I=/mnt/c/Users/cartman/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/opt/eosio.cdt/1.6.1/include -I=/mnt/c/Users/cartman/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/opt/eosio.cdt/1.6.1/include/libcxx -I=/mnt/c/Users/cartman/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/opt/eosio.cdt/1.6.1/include/eosiolib/core -I=/mnt/c/Users/cartman/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/rootfs/usr/opt/eosio.cdt/1.6.1/include/eosiolib/contracts -I=/mnt/c/Workspaces/EOS/contracts/token -I=/mnt/c/Workspaces/EOS/contracts/token/include -abigen -R=/mnt/c/Workspaces/EOS/contracts/token/ricardian /mnt/c/Workspaces/EOS/contracts/token/src/token.cpp
error message:
==============
In file included from /tmp/token.cpp:6:
/mnt/c/Workspaces/EOS/contracts/token/include/token.hpp:23:72: warning: shift count >= width of type [-Wshift-count-overflow]
uint128_t get_composite(name user) const { return (user.value << 64 || user.value);};
^ ~~
1 warning generated.
from eosfactory.
I see that the correction is too restrictive as it crushes the process in case of any compiler warning. I refine the correction. In the file eosfactory/core/utils
, the function long_process
, starting at the line 88:
def long_process(command_line, build_dir=None, is_verbose=True, prompt=None,
shell=False):
stop = False
PERIOD = 2
def thread_function():
if prompt:
print("{}: ".format(prompt), end="", flush=True)
while True:
print(".", end="", flush=True)
time.sleep(PERIOD)
if stop:
break
cwd = None
if build_dir:
cwd = os.path.join(build_dir, "cwd")
if os.path.exists(cwd):
try:
shutil.rmtree(cwd)
except Exception as e:
raise errors.Error("""
Cannot remove the directory {}.
error message:
==============
{}
""".format(cwd, str(e)))
os.mkdir(cwd)
threading.Thread(target=thread_function).start()
try:
p = subprocess.run(
command_line,
cwd=cwd,
shell=shell,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except Exception as e:
stop = True
time.sleep(PERIOD)
print(str(e))
exit()
stop = True
time.sleep(PERIOD)
print()
stdout = p.stdout.decode("ISO-8859-1")
stderr = p.stderr.decode("ISO-8859-1")
returncode = p.returncode
if cwd:
shutil.rmtree(cwd)
if returncode:
raise errors.Error("""
command line:
=============
{}
error message:
==============
{}
""".format(" ".join(command_line), stderr))
if is_verbose:
print(stdout)
print(stderr)
return p
from eosfactory.
Related Issues (20)
- Should force unique be set by default? HOT 2
- Set custom permission seems not working HOT 16
- Support of secondary index query? HOT 1
- Running Hello World test fails with error HOT 2
- Can't install eosfactory HOT 3
- Isn't data folder created before installing? HOT 15
- Compile multiple contracts HOT 6
- Unable to install on master HOT 2
- Not receiving console output with force unique HOT 5
- Failed to kill nodeos. HOT 1
- changing http-server-address HOT 1
- unrecognised option 'bnet-endpoint' HOT 4
- Can't run install.sh within a virtualenv HOT 1
- unable to run unit tests HOT 1
- Account does not have public and private key information HOT 1
- There is no push_action to Eosio account objects HOT 1
- Node restart a lot of times when start a test (MacOS) HOT 10
- KeyError: 'inline_traces' thrown from gather_console_output function in cleos.py HOT 1
- any news ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eosfactory.