[Gambas-user] Scripter Add --fromProject to scripter that will convert a project to a script

Brian G brian at westwoodsvcs.com
Thu Mar 4 16:11:11 CET 2021


How about if it just prints the one line in error, so you can identify it in your original script file.  
--
Thanks
Brian Wednesday, 03 March 2021, 10:05PM -08:00 from Bruce Steers  bsteers4 at gmail.com :

>
>
>On Thu, 4 Mar 2021 at 05:07, Brian G < brian at westwoodsvcs.com> wrote:
>>Right now it will only print warnings if select -w and verbose with -v, it prints the error and listing showing error., The errors are printed first and may come from more that one file being compiled.
>>We could add an option to suppress the error listing of the error file -terse, or maybe the opposite --error-detailed
>>The line numbers mean very little that are displayed in the error reports by the scripter without the listing of the file they are in. As again the there may be errors in more than one compiled file, or included file.
>>Remember that classes are each a separate file to the compiler. As well as the include files.
>>Any ideas what would work best?
>I'm not sure you understood me , i get the warnings/errors fine i just don't want the entire script printed on an error. the name will do
>
>I do not understand why it has to print the entire script on an error.
>It doesn't just print a "listing" It prints the module name and error position on the 1st line then prints the entire script out!
>if the script is long enough it goes beyond my terminal scroll limit.
>Seems erroneous (for my single script usage)
>
>On error i get something like the following message...
>MMain.module:6:12: error: Syntax error
>
># Gambas Project File 3.0
>Title=Gambas Script
>Startup=MMain
>
>' Gambas module file
>
>
>' Gambas script file
>Public Sub Main()
>Dim sBases
>Shell "dpkg-query --list linux*|grep \"generic\"|grep ii|awk '{print $2}" To sBases
>
>the rest of the script.....
>
>The 1st line 
>MMain.module:6:12: error: Syntax error
>
>tells me all I need to know, i'd like to not see the rest 
>If is makes an alternative project file so the line numbers are different to my actual script then can it not print just the line in error.
>
>Was just a thought.
>All the best
>BruceS
>
>--
>>Thanks
>>Brian Wednesday, 03 March 2021, 03:58PM -08:00 from Bruce Steers  bsteers4 at gmail.com :
>>
>>>Sounds like a good feature 🙂
>>>
>>>Is there an option (even a default setting maybe) to not print the script on failure just the error?
>>>Or could there be?
>>>On Wed, 3 Mar 2021, 23:47 Brian G, < brian at westwoodsvcs.com> wrote:
>>>>Is anyone interested in having a command line parameter that will allow to create a script from a project?
>>>>
>>>>gbs3 --FromProject ~/MyProjectIn ~/MyScriptOut
>>>>
>>>>--FromProject having the project directory as input and script path as output
>>>>
>>>>"Failure is the key to success; 
>>>> each mistake teaches us something"  .. Morihei Ueshiba
>>>>Brian G
>>>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
>>>
>>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
>>>
>>
>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210304/ce82de73/attachment.htm>


More information about the User mailing list