1. bug in the intinit.e file
- Posted by bugfinder Oct 08, 2010
- 1127 views
There is a bug in the intinit.e file at line 60 when Argv = {} the slice will cause an error condition. I am running the eu.ex files in a directory other than the source directory. NOTE: I should get display of the options not a slice error. This other directory contains the following : global.e keylist.e symtab.e scanner.e parser.e emit.e pathopen.e eu.ex reswords.e error.e main.e opnames.e execute.e Enviroment: E:\WORKCDE4>set eudir EUDIR=E:\EU4 E:\WORKCDE4>set euinc EUINC=E:\EU4\include;E:\EU4\source;E:\EU4\MTRINC
This will work OK running from the source directory. 55: Argv = expand_config_options(Argv) 56: m:map opts = cmd_parse( get_options(), 57: { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg 58: trace(1) 59: sequence tmp_Argv = Argv 60==> Argv = Argv[1..2] & GetDefaultArgs() 61: Argc = length(Argv) 62: 63: m:map default_opts = cmd_parse( get_options(), , Argv ) 64: merge_maps( opts, default_opts ) 65: 66: Argv = tmp_Argv 67: Argc = length( Argv ) 68: variable name? Argv Argv={{101e,58:,92\,101e,117u,524,92\,98b,105i,110n,92\,101e,117u,105i,46.,...
This will FAIL running eu.ex from the different directory with source directory set in the path. 55: Argv = expand_config_options(Argv) 56: m:map opts = cmd_parse( get_options(), 57: { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg 58: trace(1) 59: sequence tmp_Argv = Argv 60==> Argv = Argv[1..2] & GetDefaultArgs() 61: Argc = length(Argv) 62: 63: m:map default_opts = cmd_parse( get_options(), , Argv ) 64: merge_maps( opts, default_opts ) 65: 66: Argv = tmp_Argv 67: Argc = length( Argv ) 68: variable name? Argv Argv={}
2. Re: bug in the intinit.e file
- Posted by mattlewis (admin) Oct 08, 2010
- 1091 views
{{{ There is a bug in the intinit.e file at line 60 when Argv = {} the slice will
cause an error condition.
I am running the eu.ex files in a directory other than the source directory.
NOTE: I should get display of the options not a slice error.
This is really confusing.
- Where is eu.ex?
- Where is the rest of the source?
- What is your current directory in your shell?
- What did you try to run?
Matt
3. Re: bug in the intinit.e file
- Posted by jimcbrown (admin) Oct 08, 2010
- 1099 views
On Linux, but I can not reproduce these steps with eui r3414.
cp -a /home/eu/source/global.e /home/eu/source/keylist.e /home/eu/source/scanner.e /home/eu/source/parser.e /home/eu/source/emit.e /home/eu/source/pathopen.e /home/eu/source/eu.ex /home/eu/source/reswords.e /home/eu/source/error.e /home/eu/source/main.e /home/eu/source/opnames.e /home/eu/source/execute.e /tmp/y/ cd /tmp/y EUDIR=/home/eu EUINC=/home/eu/include:/home/eu/source eui eu.ex
This gives me the help screen - or the display of the list of options.
There is a bug in the intinit.e file at line 60 when Argv = {} the slice will cause an error condition. I am running the eu.ex files in a directory other than the source directory. NOTE: I should get display of the options not a slice error. This other directory contains the following : global.e keylist.e symtab.e scanner.e parser.e emit.e pathopen.e eu.ex reswords.e error.e main.e opnames.e execute.e Enviroment: E:\WORKCDE4>set eudir EUDIR=E:\EU4 E:\WORKCDE4>set euinc EUINC=E:\EU4\include;E:\EU4\source;E:\EU4\MTRINC
This will work OK running from the source directory. 55: Argv = expand_config_options(Argv) 56: m:map opts = cmd_parse( get_options(), 57: { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg 58: trace(1) 59: sequence tmp_Argv = Argv 60==> Argv = Argv[1..2] & GetDefaultArgs() 61: Argc = length(Argv) 62: 63: m:map default_opts = cmd_parse( get_options(), , Argv ) 64: merge_maps( opts, default_opts ) 65: 66: Argv = tmp_Argv 67: Argc = length( Argv ) 68: variable name? Argv Argv={{101e,58:,92\,101e,117u,524,92\,98b,105i,110n,92\,101e,117u,105i,46.,...
This will FAIL running eu.ex from the different directory with source directory set in the path. 55: Argv = expand_config_options(Argv) 56: m:map opts = cmd_parse( get_options(), 57: { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg 58: trace(1) 59: sequence tmp_Argv = Argv 60==> Argv = Argv[1..2] & GetDefaultArgs() 61: Argc = length(Argv) 62: 63: m:map default_opts = cmd_parse( get_options(), , Argv ) 64: merge_maps( opts, default_opts ) 65: 66: Argv = tmp_Argv 67: Argc = length( Argv ) 68: variable name? Argv Argv={}
4. Re: bug in the intinit.e file
- Posted by bugfinder Oct 08, 2010
- 1064 views
- Where is eu.ex?
The contents of the other directory e:\workcde4 is described in the first blue section of my first posting. It has a eu.ex file. The source is in e:\eu4\source directory also has eu.ex file. I am running from two different directories. Also if you look at the first blue section of my first posting you will see what my euinc and eudir look like.
- Where is the rest of the source?
The source is in the e:\eu4\source directory as it normal is distributed.
- What is your current directory in your shell?
e:\eu4\source when running with no error. e:\workcde4 when running causes error. look at the first blue section of the my first posting !
- What did you try to run?
Just eui.exe eu.ex
5. Re: bug in the intinit.e file
- Posted by mattlewis (admin) Oct 08, 2010
- 1074 views
The contents of the other directory e:\workcde4 is described in the first blue section of my first posting. It has a eu.ex file.
The source is in e:\eu4\source directory also has eu.ex file.
I am running from two different directories.
Also if you look at the first blue section of my first posting you will see what my euinc and eudir look like.
Sorry, reading more closely, I see that it is. Originally, I copied the eu.ex source to a different directory and it ran fine. I can't see why or where the contents of Argv are disappearing. What was it before being passed to expand_config_options()?
Matt
6. Re: bug in the intinit.e file
- Posted by bugfinder Oct 08, 2010
- 1051 views
Matt: If you add this line it will fix the problem. Argv = expand_config_options(Argv) m:map opts = cmd_parse( get_options(), { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg }, Arg add ==>> if length(Argv) = 0 then Argv = getenv("eudir") end if sequence tmp_Argv = Argv Argv = Argv[1..2] & GetDefaultArgs() Argc = length(Argv)
7. Re: bug in the intinit.e file
- Posted by jimcbrown (admin) Oct 08, 2010
- 1051 views
Matt: If you add this line it will fix the problem. Argv = expand_config_options(Argv) m:map opts = cmd_parse( get_options(), { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg }, Arg add ==>> if length(Argv) = 0 then Argv = getenv("eudir") end if sequence tmp_Argv = Argv Argv = Argv[1..2] & GetDefaultArgs() Argc = length(Argv)
This is wrong for a couple of different reasons:
1) EUDIR is not guaranteed to be set for 4.0 (we're moving to use of eu.cfg)
2) if EUDIR is not set, then getenv() returns -1, which could cause a crash as Argv is a sequence
3) even if EUDIR is set, Argv is meant to be a list of strings. Setting it equal to the contents of EUDIR will make Argv into a single string (or a list of characters)
4) Most importantly, the real problem seems to be in getting the list of config options. That is the reason why Argv is empty. It's not clear to any of us why that is failing for you...
8. Re: bug in the intinit.e file
- Posted by mattlewis (admin) Oct 08, 2010
- 1059 views
If you add this line it will fix the problem.
Argv = expand_config_options(Argv) m:map opts = cmd_parse( get_options(), { NO_VALIDATION_AFTER_FIRST_EXTRA, PAUSE_MSG, pause_msg }, Arg add ==>> if length(Argv) = 0 then Argv = getenv("eudir") end if sequence tmp_Argv = Argv Argv = Argv[1..2] & GetDefaultArgs() Argc = length(Argv)
No, it really won't for several reasons. Argv is meant to hold the command line options. The interpreter has to pick out those meant for it vs the path for your program and any arguments meant for it. Somewhere along the line, it's apparently losing all of that, which shouldn't be happening.
Furthermore, eu4.0 is able to run without EUDIR or EUINC or any environment variables. I haven't set one in a long, long time. That information can be set through eu.cfg files. So, in case EUDIR isn't set, you'll get a type check error back from getenv().
We need to know why and where the contents of Argv are being erased. What version of the code are you using? Are there any local modifications?
Matt
9. Re: bug in the intinit.e file
- Posted by bugfinder Oct 08, 2010
- 1037 views
We need to know why and where the contents of Argv are being erased. What version of the code are you using? Are there any local modifications?
I am using SVN 3474 with no modifications. That fix only got me the option list so it did not solve anything anyways.
I looked at the option list displayed and there is no comment about how to pass a file to run on the command line ( example: eui.exe eu.ex test.ex ) The eui.exe file and euiw.exe should give a simple example with an option to display help; not just scroll off the screen with all the options.
The options used by developers should be a separate help display from the user options display.
10. Re: bug in the intinit.e file
- Posted by jimcbrown (admin) Oct 08, 2010
- 1003 views
The options used by developers should be a separate help display from the user options display.
Strongly disagree. eu.ex is intended for use by developers only.
11. Re: bug in the intinit.e file
- Posted by mattlewis (admin) Oct 08, 2010
- 1033 views
The options used by developers should be a separate help display from the user options display.
Strongly disagree. eu.ex is intended for use by developers only.
Yes, but if you run eui by itself, or with -?, it should probably have something like:
Usage: eui [options] <program> [program arguments]
Matt
12. Re: bug in the intinit.e file
- Posted by bugfinder Oct 08, 2010
- 1035 views
The options used by developers should be a separate help display from the user options display.
Strongly disagree. eu.ex is intended for use by developers only.
[/quote source doc]
This directory contains a Euphoria interpreter written in Euphoria. It was developed by Rapid Deployment Software. There are no restrictions on how you may use these files.
[/quote]
eu.ex has been available for users in any recent version 2.4 2.5 3.1 etc.
13. Re: bug in the intinit.e file
- Posted by jimcbrown (admin) Oct 08, 2010
- 1071 views
The options used by developers should be a separate help display from the user options display.
Strongly disagree. eu.ex is intended for use by developers only.
[/quote source doc]
This directory contains a Euphoria interpreter written in Euphoria. It was developed by Rapid Deployment Software. There are no restrictions on how you may use these files.
eu.ex has been available for users in any recent version 2.4 2.5 3.1 etc.
[/quote]
So has, e.g., dis.ex - but not very many users use it.
Aside from that, eu.ex does not have any special options of its own. It has the same options as eui.
With the exception of the new coverage options, very few of eui's options are intended for developers only. Maybe -test and -strict. Most of what you see is intended for use by the end-user.
14. Re: bug in the intinit.e file
- Posted by petelomax Oct 08, 2010
- 1051 views
eu.ex has been available for users in any recent version 2.4 2.5 3.1 etc.
Minor correction: it appeared with 2.5 and will not run (unaltered) on 2.4
Pete