[Csnd-dev] lines numbers missing for error messages
Date | 2017-06-11 10:25 |
From | joachim heintz |
Subject | [Csnd-dev] lines numbers missing for error messages |
since some time, the lines numbers are missing for the common "used before defined" errors. for instance: instr 1 aBla ntrpol a1, a2, 0 endin returns this error message: error: Variable 'a1' used before defined from file /home/jh/Desktop/test2.csd (1) error: Variable type for a1 could not be determined. from file /home/jh/Desktop/test2.csd (1) Parsing failed to syntax errors for bigger csd files it would be very helpful to see the line number immediately. thanks - |
Date | 2017-06-11 15:02 |
From | jpff |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
o you meanlike tis? STARTING FILE Creating orchestra Creating score rtaudio: pulseaudio module enabled rtmidi: ALSA Raw MIDI module enabled error: Variable 'a1' used before defined Line 5 from file def.csd (1) error: Variable type for a1 could not be determined. from file def.csd (1) Parsing failed to syntax errors Stopping on parser failure cannot compile orchestra end of score. overall amps: 0.0 overall samples out of range: 0 1 errors in performance Elapsed time at end of performance: real: 0.001s, CPU: 0.001s Will commit On Sun, 11 Jun 2017, joachim heintz wrote: > since some time, the lines numbers are missing for the common "used before > defined" errors. for instance: > > instr 1 > aBla ntrpol a1, a2, 0 > endin > > returns this error message: > > error: Variable 'a1' used before defined > from file /home/jh/Desktop/test2.csd (1) > error: Variable type for a1 could not be determined. > from file /home/jh/Desktop/test2.csd (1) > Parsing failed to syntax errors > > for bigger csd files it would be very helpful to see the line number > immediately. > > thanks - > joachim |
Date | 2017-06-11 15:07 |
From | joachim heintz |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
yes exactly. please commit, i will try out. thanks! joachim On 11/06/17 16:02, jpff wrote: > o you meanlike tis? > > STARTING FILE > Creating orchestra > Creating score > rtaudio: pulseaudio module enabled > rtmidi: ALSA Raw MIDI module enabled > error: Variable 'a1' used before defined > Line 5 > from file def.csd (1) > error: Variable type for a1 could not be determined. > from file def.csd (1) > Parsing failed to syntax errors > Stopping on parser failure > cannot compile orchestra > end of score. overall amps: 0.0 > overall samples out of range: 0 > 1 errors in performance > Elapsed time at end of performance: real: 0.001s, CPU: 0.001s > > > Will commit > > > On Sun, 11 Jun 2017, joachim heintz wrote: > >> since some time, the lines numbers are missing for the common "used >> before defined" errors. for instance: >> >> instr 1 >> aBla ntrpol a1, a2, 0 >> endin >> >> returns this error message: >> >> error: Variable 'a1' used before defined >> from file /home/jh/Desktop/test2.csd (1) >> error: Variable type for a1 could not be determined. >> from file /home/jh/Desktop/test2.csd (1) >> Parsing failed to syntax errors >> >> for bigger csd files it would be very helpful to see the line number >> immediately. >> >> thanks - >> joachim >> |
Date | 2017-06-11 17:36 |
From | joachim heintz |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
this works, wonderful. would it be possible to quote the offending line in addition (as it is done for wrong opcode arguments)? then the error message would be in this case: Line 5 >> aBla ntrpol a1, a2, 0 from file def.csd (1) error: Variable type for a1 could not be determined. from file def.csd (1) this would be very helpful, too. thanks and regards - joachim On 11/06/17 16:07, joachim heintz wrote: > yes exactly. please commit, i will try out. > thanks! > joachim > > > On 11/06/17 16:02, jpff wrote: >> o you meanlike tis? >> >> STARTING FILE >> Creating orchestra >> Creating score >> rtaudio: pulseaudio module enabled >> rtmidi: ALSA Raw MIDI module enabled >> error: Variable 'a1' used before defined >> Line 5 >> from file def.csd (1) >> error: Variable type for a1 could not be determined. >> from file def.csd (1) >> Parsing failed to syntax errors >> Stopping on parser failure >> cannot compile orchestra >> end of score. overall amps: 0.0 >> overall samples out of range: 0 >> 1 errors in performance >> Elapsed time at end of performance: real: 0.001s, CPU: 0.001s >> >> >> Will commit >> >> >> On Sun, 11 Jun 2017, joachim heintz wrote: >> >>> since some time, the lines numbers are missing for the common "used >>> before defined" errors. for instance: >>> >>> instr 1 >>> aBla ntrpol a1, a2, 0 >>> endin >>> >>> returns this error message: >>> >>> error: Variable 'a1' used before defined >>> from file /home/jh/Desktop/test2.csd (1) >>> error: Variable type for a1 could not be determined. >>> from file /home/jh/Desktop/test2.csd (1) >>> Parsing failed to syntax errors >>> >>> for bigger csd files it would be very helpful to see the line number >>> immediately. >>> >>> thanks - >>> joachim >>> >> |
Date | 2017-06-11 21:16 |
From | jpff |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
>>>>> "joachim" == joachim heintz |
Date | 2017-06-11 21:47 |
From | Michael Gogins |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
I looked at this code too and it's not so easy. But having accurate line numbers would be a big help. Best, Mike On Jun 11, 2017 16:17, "jpff" <jpff@codemist.co.uk> wrote: >>>>> "joachim" == joachim heintz <jh@JOACHIMHEINTZ.DE> writes: |
Date | 2017-06-11 22:12 |
From | Guillermo Senna |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
How about adding the following hack in ~/.bashrc as a workaround for quickly checking what the offending line is? function cs_debugline { sed -n "$(csound $1 | sed -n 's/Line \(.*\)/\1/p')"p "$1"; } On 11/06/17 13:36, joachim heintz wrote: > this works, wonderful. > > would it be possible to quote the offending line in addition (as it is > done for wrong opcode arguments)? > then the error message would be in this case: > > Line 5 > >> aBla ntrpol a1, a2, 0 > from file def.csd (1) > error: Variable type for a1 could not be determined. > from file def.csd (1) > > this would be very helpful, too. > > thanks and regards - > > joachim > > > On 11/06/17 16:07, joachim heintz wrote: >> yes exactly. please commit, i will try out. >> thanks! >> joachim >> >> >> On 11/06/17 16:02, jpff wrote: >>> o you meanlike tis? >>> >>> STARTING FILE >>> Creating orchestra >>> Creating score >>> rtaudio: pulseaudio module enabled >>> rtmidi: ALSA Raw MIDI module enabled >>> error: Variable 'a1' used before defined >>> Line 5 >>> from file def.csd (1) >>> error: Variable type for a1 could not be determined. >>> from file def.csd (1) >>> Parsing failed to syntax errors >>> Stopping on parser failure >>> cannot compile orchestra >>> end of score. overall amps: 0.0 >>> overall samples out of range: 0 >>> 1 errors in performance >>> Elapsed time at end of performance: real: 0.001s, CPU: 0.001s >>> >>> >>> Will commit >>> >>> >>> On Sun, 11 Jun 2017, joachim heintz wrote: >>> >>>> since some time, the lines numbers are missing for the common "used >>>> before defined" errors. for instance: >>>> >>>> instr 1 >>>> aBla ntrpol a1, a2, 0 >>>> endin >>>> >>>> returns this error message: >>>> >>>> error: Variable 'a1' used before defined >>>> from file /home/jh/Desktop/test2.csd (1) >>>> error: Variable type for a1 could not be determined. >>>> from file /home/jh/Desktop/test2.csd (1) >>>> Parsing failed to syntax errors >>>> >>>> for bigger csd files it would be very helpful to see the line number >>>> immediately. >>>> >>>> thanks - >>>> joachim >>>> >>> |
Date | 2017-06-11 22:25 |
From | Guillermo Senna |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
Yeah, I totally forgot about csound and stderr: function cs_debugline { sed -n "$(csound $1 2>&1 >/dev/null | sed -n 's/Line \(.*\)/\1/p')"p "$1"; } On 11/06/17 18:12, Guillermo Senna wrote: > function cs_debugline { sed -n "$(csound $1 | sed -n 's/Line |
Date | 2017-06-12 06:52 |
From | joachim heintz |
Subject | Re: [Csnd-dev] lines numbers missing for error messages |
ok — then for the current state the line number is a big improvement for the users. for future, i will try to make a list as a suggestion, which error messages might be ideal for people learning and using csound, from my experience (mainly looking at my students). best - joachim On 11/06/17 22:16, jpff wrote: >>>>>> "joachim" == joachim heintz |