bugJava Training Wheels - Bugs: bug #49975, Received `Lisp error:...

 
 

bug #49975: Received `Lisp error: (cl-assertion-failed (read-ready str))' when trying to compile jtw file

Submitter:  Michael Pagan <pegzmasta>
Submitted:  Tue 03 Jan 2017 02:43:37 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 27 Jan 2017 01:17:25 AM UTC, comment #14: 

How long have you used Emacs for?

I have known it for 20 years and in my experience, it is well worth the time it takes to learn to program in Emacs Lisp.  See my website for all of the weird and wonderful Emacs code that I have written over those 20 years.

Happy Hacking, fellow hacker! :-)

Davin Pearson <davin_pearson>
Group administrator
Thu 26 Jan 2017 03:11:36 PM UTC, comment #13: 

I try to use Emacs for almost everything I do, but I am a novice-- more comfortable in the shell for now (within an Emacs buffer, of course).

I forgot that `yes' is indeed a command; good to use, since I agree with the installers defaults; re:

yes | bash configure


I've taken a look at your book, just now: Good choice of license; very intriguing topics; and I think the way LaTeX is used to typeset your code and other text makes the book much easier to read, too-- makes me want to brush up on LaTeX.  Both J.T.W. and Lisp++ are very appealing to me, so I will definitely read this during my spare time.  Thanks for the links!

I will hit up the mailing list if I need any help, or have any questions or feedback about your book, as well as J.T.W.

Just thought you should know that I have bookmarked your website, a very good resource for computing and research, in general.

Once again, Davin: Excellent work!

Michael Pagan <pegzmasta>
Thu 26 Jan 2017 06:44:14 AM UTC, comment #12: 

How about my book... have you read it?  The first part of it deals with J.T.W. and the second part of it deals with Lisp++,
a new programming language that I have developed to make it easier to program in C++.

Here is the front and back cover of the book:


http://davinpearson.com/binaries/both-sides6-20170126-142358.pdf


and here is the book itself:


http://davinpearson.com/binaries/book6-20170126-141011.pdf


Davin Pearson <davin_pearson>
Group administrator
Thu 26 Jan 2017 06:34:48 AM UTC, comment #11: 

How about this version:


I am verbatim text and should appear in a yellow box.



Davin Pearson <davin_pearson>
Group administrator
Thu 26 Jan 2017 06:26:24 AM UTC, comment #10: 

Are you using GNU Emacs as your editor for *.jtw code?

If not, then execute the following command from the folder java-training-wheels:

+verbatim
yes | bash configure
-verbatim

while logged in as your normal user account (NOT root)

+verbatim
http://davinpearson.com/binaries/both-sides6-20170126-142358.pdf
-verbatim

and

+verbatim
http://davinpearson.com/binaries/book6-20170126-141011.pdf
-verbatim

Davin Pearson <davin_pearson>
Group administrator
Wed 25 Jan 2017 02:40:08 AM UTC, comment #9: 

Excellent work, Davin!

I just tested it-- can't wait to use this.  I think you can officially close this bug, now.

Keep up the good work!

Ps
I'd like to send any future feedback I might have to a mailing list, if possible.  Let me know if you need any help setting it up.

Michael Pagan <pegzmasta>
Wed 25 Jan 2017 01:20:44 AM UTC, comment #8: 

Thanks for your bugfix re:

(setq dlisp-dir (format "%s/dlisp" (getenv "PWD")))
(setq load-path (cons dlisp-dir load-path))

The latest tarball (http://davinpearson.com/binaries/java-training-wheels.tar.gz) provides support for file inclusion.

You simply write:

include "foo.function"

in your J.T.W. file.  It checks for infinite loops in the file inclusion process.

Sorry for taking so long to respond to you.  I was hard at work debugging the J.T.W. system!


Davin Pearson <davin_pearson>
Group administrator
Tue 24 Jan 2017 03:36:36 PM UTC, comment #7: 

Thanks for the update!

One minor bug when installing, though:

$ sudo ./configure
(setq args "")
Cannot open load file: no such file or directory, diagnose


The first line of code from jtw-install-and-uninstall.el assumes that I already have the dlisp directory installed in my home directory, when I have yet to install jtw:

(setq load-path (cons "~/dlisp/" load-path))


Since I know that the dlisp directory is in the same directory as your configure script from a freshly extracted tarball, I replaced the above line of code in jtw-install-and-uninstall.el with the following (i.e. I used the present-working-directory variable from the shell environment, $PWD, to help set dlisp-dir):

(setq dlisp-dir (format "%s/dlisp" (getenv "PWD")))
(setq load-path (cons dlisp-dir load-path))


After this modification, your installer worked and gave me a working jtw system.

Could you add the previous 2 lines of code to your current jtw that you are working on?

Michael Pagan <pegzmasta>
Tue 24 Jan 2017 07:05:46 AM UTC, comment #6: 

Try downloading the latest http://davinpearson.com/binaries/java-training-wheels.tar.gz

It contains numerous bug-fixes and should hopefully work on both GNU/Linux and Windows.

Currently file inclusion doesn't work and I will spend the remainder of this week working on this.

Davin Pearson <davin_pearson>
Group administrator
Fri 13 Jan 2017 03:03:42 AM UTC, comment #5: 

Hello, Davin:

I'm glad I was able to help you improve your software!  Funny thing about bugs, though: Squash one, and sometimes, another pops up in it's place.  The last tarball I installed worked with only one trivial error; however, your latest tarball does not work on GNU/Linux and has a new non-trivial error for me (detailed below):


emacs --batch --eval "(setq dir \"/usr/share/emacs/site-lisp/dlisp/\")" --load /usr/share/emacs/site-lisp/dlisp/jtw-build-class-db.el --funcall doit
Welcome to jtw-build-class-db.el
dir=/usr/share/emacs/site-lisp/dlisp/
*def-dir*=~/jtw-tutorials/
Type C-x 1 to delete the help window, C-M-v to scroll help.
*** checkpoint 1
*** checkpoint About to call warn--build
*** beg warn--build-method-database
*** checkpoint *def-dir*=~/jtw-tutorials/
*** checkpoint *stump*=TurtleTest
*** checkpoint * list=(/home/pagan/jtw-tutorials/MyFirstProgram.jtw)
Debugger entered--Lisp error: (error "Should never happen #2")
  signal(error ("Should never happen #2"))
  error("Should never happen #2")
  db--cull-package-spec("TurtleTest.jtw" nil)
  (setq warn--master-list--thirdly (db--cull-package-spec file warn--master-list--thirdly))
  (save-excursion (setq file (concat *stump* ".jtw")) (setq warn--master-list--thirdly (warn--build-method-database)) (if (string= "Beer.jtw" file) (debug "#1b Found Beer.jtw")) (setq warn--master-list--thirdly (db--cull-package-spec file warn--master-list--thirdly)) (if (string-match "pkg.pkg" file) (error (format "#15 file=%s" file))) (find-file file) (goto-char (point-min)) (while (re-search-forward "\\(^\\(public\\|final\\|abstract\\)[         ]+\\)*class \\([A-Z][a-zA-Z0-9_]*\\)" nil t) (save-excursion (setq class (buffer-substring-no-properties (match-beginning 3) (match-end 3))) (setq ptr2 warn--master-list--thirdly) (setq count 0) (while ptr2 (setq count (1+ count)) (goto-char (point-min)) (font-lock-fontify-buffer) (while (warn--re-search-forward--no-strings-no-comments "\\<\\([a-z.]+\\.\\)?\\([A-Z][a-zA-Z0-9_]*\\)\\(\\.[a-z][a-zA-Z0-9_]*\\)?\\((\\)?" nil t) (if (and (match-beginning 1) (match-end 1)) (setq package (match-string 1)) (setq package "")) (if (and (match-beginning 4) (match-end 4)) (setq open-bra t) (setq open-bra nil)) (if (and (match-beginning 3) (match-end 3)) (progn (setq name ...) (setq name ...)) (setq name "")) (setq class-internal (buffer-substring-no-properties (match-beginning 2) (match-end 2))) (if (and (not ...) (not ...)) (setq package (concat package "."))) (if (string= package "") (setq package-and-class class-internal) (setq package-and-class (concat package class-internal))) (if (and (not ...) (not ...) (not ...) (not ...) (not ...) (not ...) (not ...)) (progn (if ... t) (if ... t) (if ... ...) (if ... ...)))) (goto-char (point-min)) (setq ptr2 (cdr ptr2))))) (message "*** end warn--build-method-database") (setq warn--master-list--thirdly (warn--trim-duplicates warn--master-list--thirdly)))
  (let (ptr file list count (case-fold-search nil) warn--master-list--thirdly) (save-excursion (setq file (concat *stump* ".jtw")) (setq warn--master-list--thirdly (warn--build-method-database)) (if (string= "Beer.jtw" file) (debug "#1b Found Beer.jtw")) (setq warn--master-list--thirdly (db--cull-package-spec file warn--master-list--thirdly)) (if (string-match "pkg.pkg" file) (error (format "#15 file=%s" file))) (find-file file) (goto-char (point-min)) (while (re-search-forward "\\(^\\(public\\|final\\|abstract\\)[         ]+\\)*class \\([A-Z][a-zA-Z0-9_]*\\)" nil t) (save-excursion (setq class (buffer-substring-no-properties (match-beginning 3) (match-end 3))) (setq ptr2 warn--master-list--thirdly) (setq count 0) (while ptr2 (setq count (1+ count)) (goto-char (point-min)) (font-lock-fontify-buffer) (while (warn--re-search-forward--no-strings-no-comments "\\<\\([a-z.]+\\.\\)?\\([A-Z][a-zA-Z0-9_]*\\)\\(\\.[a-z][a-zA-Z0-9_]*\\)?\\((\\)?" nil t) (if (and ... ...) (setq package ...) (setq package "")) (if (and ... ...) (setq open-bra t) (setq open-bra nil)) (if (and ... ...) (progn ... ...) (setq name "")) (setq class-internal (buffer-substring-no-properties ... ...)) (if (and ... ...) (setq package ...)) (if (string= package "") (setq package-and-class class-internal) (setq package-and-class ...)) (if (and ... ... ... ... ... ... ...) (progn ... ... ... ...))) (goto-char (point-min)) (setq ptr2 (cdr ptr2))))) (message "*** end warn--build-method-database") (setq warn--master-list--thirdly (warn--trim-duplicates warn--master-list--thirdly))))
  warn--build()
  (setq list (warn--build))
  (let (list ptr) (checkpoint "About to call warn--build") (setq list (warn--build)) (message "*** save-class-db") (message "*def-dir*=%s" *def-dir*) (find-file (concat *def-dir* "class-db.el")) (emacs-lisp-mode) (erase-buffer) (setq list (warn--trim-duplicates list)) (insert ";;; Automatically generated file.  Do not edit!\n") (setq ptr list) (setq count 0) (insert "(\n") (while ptr (setq class (nth slot-class-name (car ptr))) (setq class-or-interface (nth slot-class-or-interface (car ptr))) (setq functions (nth slot-functions (car ptr))) (setq classVars (nth slot-classVars (car ptr))) (setq methods (nth slot-methods (car ptr))) (setq properties (nth slot-properties (car ptr))) (insert " (" (prin1-to-string class) " " (prin1-to-string class-or-interface) "\n") (insert "  " (prin1-to-string functions) "\n") (insert "  " (prin1-to-string classVars) "\n") (insert "  " (prin1-to-string methods) "\n") (insert "  " (prin1-to-string properties) "\n") (insert " )\n") (setq count (1+ count)) (setq ptr (cdr ptr))) (insert ")\n") (save-buffer (quote NO-QUESTIONS)) (kill-buffer) list)
  (save-excursion (let (list ptr) (checkpoint "About to call warn--build") (setq list (warn--build)) (message "*** save-class-db") (message "*def-dir*=%s" *def-dir*) (find-file (concat *def-dir* "class-db.el")) (emacs-lisp-mode) (erase-buffer) (setq list (warn--trim-duplicates list)) (insert ";;; Automatically generated file.  Do not edit!\n") (setq ptr list) (setq count 0) (insert "(\n") (while ptr (setq class (nth slot-class-name (car ptr))) (setq class-or-interface (nth slot-class-or-interface (car ptr))) (setq functions (nth slot-functions (car ptr))) (setq classVars (nth slot-classVars (car ptr))) (setq methods (nth slot-methods (car ptr))) (setq properties (nth slot-properties (car ptr))) (insert " (" (prin1-to-string class) " " (prin1-to-string class-or-interface) "\n") (insert "  " (prin1-to-string functions) "\n") (insert "  " (prin1-to-string classVars) "\n") (insert "  " (prin1-to-string methods) "\n") (insert "  " (prin1-to-string properties) "\n") (insert " )\n") (setq count (1+ count)) (setq ptr (cdr ptr))) (insert ")\n") (save-buffer (quote NO-QUESTIONS)) (kill-buffer) list))
  save-class-db()
  doit()
  call-interactively(doit nil nil)
  command-execute(doit)
  command-line-1(("--eval" "(setq dir \"/usr/share/emacs/site-lisp/dlisp/\")" "--load" "/usr/share/emacs/site-lisp/dlisp/jtw-build-class-db.el" "--funcall" "doit"))
  command-line()
  normal-top-level()

make: *** [build-class-db] Error 255


=== Thoughts ===

Bugs... such persistent digital creatures.  Please don't fret, though!  I'm not on a time limit to learn Java, so take your time with this one ;-)

I did notice that your system now echoes which program it is operating on (e.g. Welcome to jtw-build-class-db.el)-- which is a good thing-- when trying to compile `jtw' files, and if I was proficient with elisp I would provide further help on the matter; alas, sending a bug report is the best that I can do right now-- will learn it, eventually :-)

Forgive me if I am out-of-bounds, but I must ask: Are you developing jtw on Windows?  If so, are you using Cygwin or MinGW?  On the premise that you are using Windows (correct me if I'm wrong): I suggest that you should test your software on Windows (optional) and, more importantly, on GNU/Linux (required)-- just to ensure that your software works on both systems, since Cygwin and MinGW might not provide you an equivalent environment as GNU/Linux.

=== Debugging GNU programs on GNU ===

To reinforce the above, I'm quoting Stallman from his GNU Maintainers Guide-- specifically, chapter 8 (Platforms to Support):

>    It is important to test the program personally on GNU or GNU/Linux,
> because these are the most important platforms for a GNU package.  If
> you don't have access to one of these platforms, as a GNU maintainer you
> can get access to the general GNU login machine; see
> <http://www.gnu.org/software/README.accounts.html>.


In essence, debugging on MinGW or Cygwin in order to ensure that it works on GNU/Linux may not be enough.  You might have to request the GNU hackers to provide you with a fencepost account, so that you can debug jtw on a GNU machine, hence ensuring that you can debug your program so that it works on GNU (the main platform that GNU programs should work on, anyway).

=== Version Control ===

I know I'm making a lot of suggestions, but this one has some merit, too.  You should, if not already, consider version controlling your software.  GNU Savannah allows you to use several different version control platforms for maintaining your software.  I personally find it useful, even as a novice, because I can identify when which code was added to my programs or someone else's programs.

I find it more convenient than reading through a lengthy ChangeLog (although still important), because I can just click on a file in a repository and start tracking changes that were made to it.  Right now, there is no code repository online for jtw.  Sometimes new changes to a program can introduce new bugs (as is the case here), and a version control system could allow potential contributors to track the bug from a previous working version of a program, and hence correct it before the bug grows into a bigger problem (which could happen if a bug goes unnoticed for a long time).

=== Happy Hacking ===

I wanted to end this report on a good note.  Please don't get upset that there are more bugs in your software.  My software has bugs, too.  The reason why I'm in a good mood, is because at least I have the freedom to study your software and learn more.  If the program was nonfree, then I'd really be helpless and hence would be in a bad mood (thankfully, not the case).  Please consider everything I mentioned above, though-- especially the part about debugging on GNU, which is very important for a GNU Maintainer.

So, last but not least... Good luck, and happy hacking!

Michael Pagan <pegzmasta>
Thu 12 Jan 2017 07:54:11 AM UTC, comment #4: 

Hi Michael Pagan,

Thank you for your feedback regarding my Java Training Wheels system.  Your feedback has helped me to improve the system.

I have just finished debugging my jtw to java converter.

As before, executing "make clean" causes the database of class properties/methods/functions/classVars to be built.  The database is located in the following file: class-db.el

This is used by the jtw to java converter to produce diagnostic error messages suitable for the source file.

To activate my latest version of java-training-wheels.tar.gz, you need to visit davinpearson.com/binaries and click on java-training-wheels.tar.gz link.

Davin Pearson <davin_pearson>
Group administrator
Thu 05 Jan 2017 02:45:04 AM UTC, comment #3: 

Thank you!  It works like a charm, now.  I am curious, though, why I get a `class-db.el' file when I issue make clean MyFirstProgram.run versus make MyFirstProgram.run?  It says not to edit at the top of the file; is it important?

== As for the status of the bugs ==

  1. Bug 1-- SOLVED; however, there are some remnants of unnecessary code (I'll explain) which did not work in the last tarball I used (which is why in my patch I deleted them)
  2. Bug 2-- SOLVED
  3. Bug 3-- PENDING; J.T.W. shows the same output as before.  It doesn't bother me, but it should be fixed when you make your next release in your software's Download Area on GNU Savannah.  I only say this, because it might confuse new users of your software.


== Some remnant code was found ==

The remnant code I mentioned before is on Line 346 to 349 in your latest version of jtw-install-and-uninstall.el.

Changing the following from what you currently have,

    (if (re-search-forward "PREFIX=.*" nil t)
        (replace-match (concat "PREFIX=" *prefix*) nil nil)
      (forward-line 35)
      (insert          (concat "PREFIX=" *prefix* "\n")))


To something like this...

    (if (re-search-forward "PREFIX=.*" nil t)
        (replace-match (concat "PREFIX=" *prefix*) nil nil))


... will still yield a working J.T.W..  Although I may not be an expert at elisp, I do understand the original inclusion of (forward-line 35), which is to go to the exact position where the PREFIX variable is defined, and then (insert[...]) would insert the new value; however, (replace-match[...]) already accomplishes the same mission as both forward-line and insert, except in a more efficient manner (i.e. you don't need to tell emacs exactly which line PREFIX is on, which could change in the future if you add more code to your Makefile) and in only a single line of code.

I use GNU Sed very frequently, so I thought a REGEX solution would be best (i.e. "PREFIX=.*").  What do you think about it?

== Creating a mailing list ==

I would follow Savannah's maintenance docs on this:
http://savannah.gnu.org/maintenance/MailingListCreation/

You have to hover your mouse over the Mailing Lists link on your project development page in order to get a drop-down menu that reveals the Configure: link, or you can click here.  You can create a jtw-help mailing list for users like me; jtw-bugs (optional), if you want users to verify with you first if something is really a bug or not before they submit it to a bug tracker.  I will post on your mailing list-- as soon as it's setup-- if I need any help or have any questions.

It's one of my new year's resolutions to learn Java, so thank you for the bugfixes and for creating GNU J.T.W.!

Michael Pagan <pegzmasta>
Thu 05 Jan 2017 01:04:37 AM UTC, comment #2: 

As per the instructios in the tutorial, you need to execute the following Makefile targets:

make clean MyFirstProgram.run

What is the status of the three bugs that you found in my code?

Have they vanished?

Davin Pearson <davin_pearson>
Group administrator
Thu 05 Jan 2017 12:57:43 AM UTC, comment #1: 

Thank you for your interest in my project.

I believe that I have fixed the three bugs that you mentioned in your submission to me.  Try going to davinpearson.com/binaries
and downloading java-training-wheels.tar.gz

How do I go about creating a mailing list?

Davin Pearson <davin_pearson>
Group administrator
Tue 03 Jan 2017 02:43:37 AM UTC, original submission:  

Greetings, fellow hacker:

First off, congratulations on getting J.T.W. accepted as a GNU project!  I downloaded your software, because I wanted to learn Java in a comfortable manner.  I encountered 3 bugs, however:

  1. PREFIX dir is not setup properly
  2. Once PREFIX dir is setup properly, however, I can not compile ~/jtw-tutorials/MyFirstProgram.jtw; perhaps you can enlighten me, ;-)
  3. Uninstalling via sudo make uninstall ends in an error, although successful


Bug 1


J.T.W. assumed that I was on Windows, when I'm actually using GNU/Linux.  This is depicted by the following output:

$ cd ~/jtw-tutorials/
$ make MyFirstProgram.run
* Stage 1 : Debugging MyFirstProgram.jtw and building MyFirstProgram.java file
emacs --batch --eval "(setq *prefix* \"c:/java-training-wheels\")" --eval "(setq *stump* \"MyFirstProgram\")" --load c:/java-training-wheels/share/emacs/site-lisp/dlisp/jtw-build-jtw.el --funcall doit
Cannot open load file: no such file or directory, c:/java-training-wheels/share/emacs/site-lisp/dlisp/jtw-build-jtw.el
make: *** [MyFirstProgram.java] Error 255


Seeing that this is a GNU program, I decided to go the extra mile and patch this bug in java-training-wheels/install-stuff/jtw-install-and-uninstall.el.  Without the patch, the PREFIX variable directory is setup on Windows by default, but not on GNU/Linux (usually the reverse is true).  I've also added lexical scope binding so that the prefix variable is considered a buffer local variable.  I added lexical scoping, because I experienced the following emacs error after installing J.T.W.:

Symbol's value as variable is void : PREFIX=/usr


After applying the patch and re-installing per the README.txt file, the error went away and I even received some extra feedback after the install that I did not see before (as noted below):

About to do: chmod 755 /usr/share/info
(Shell command succeeded with no output)
About to do: chmod 644 /usr/share/info/*.*
(Shell command succeeded with no output)
About to do: mkdir -p /usr/share/doc/jtw
(Shell command succeeded with no output)
About to do: cp -puv manual/jtw-manual/* /usr/share/doc/jtw-manual
About to do: chmod 755 /usr/share/doc/jtw-manual
About to do: chmod 644 /usr/share/doc/jtw-manual/*.*
**** splatting file dir=/usr/share/info/dir
*** d-unsplat-file-dir on file /usr/share/info/dir

(No files need saving)
*** d-splat-file-dir on file /usr/share/info/dir
About to do: chmod 666 "/usr/share/info/dir"
(Shell command succeeded with no output)
Saving file /usr/share/info/dir...
Wrote /usr/share/info/dir
Beginning of buffer


Attached is a patch file for this fix; when applying this patch, you must be inside your install-stuff directory.

Bug 2


This is the bug I would like to be fixed the most, so that I can compile .jtw files; however, I am not an expert at elisp (I barely managed to patch J.T.W.).  The following output represents my attempt at compiling MyFirstProgram.jtw per the instructions of Tutorial 1:

$ cd ~/jtw-tutorials/
$ make MyFirstProgram.run
* Stage 1 : Debugging MyFirstProgram.jtw and building MyFirstProgram.java file
emacs --batch --eval "(setq *prefix* \"/usr\")" --eval "(setq *stump* \"MyFirstProgram\")" --load /usr/share/emacs/site-lisp/dlisp/jtw-build-jtw.el --funcall doit
Type C-x 1 to delete the help window, C-M-v to scroll help.
Provided feature diagnose
Provided feature directory-files-deep
Welcome to jtw-build-class-db.el
*** checkpoint 1
#69 *def-dir*=~/jtw-tutorials/
*** checkpoint **** #4 *def-dir*=~/jtw-tutorials/
*** checkpoint **** #4 *def-dir*=~/jtw-tutorials/
*** checkpoint 2
*** checkpoint 3
*** checkpoint **** #9 *def-dir*=~/jtw-tutorials/
*** checkpoint **** #8 *def-dir*=~/jtw-tutorials/
*** checkpoint doit:-6
*** checkpoint **** #7 *def-dir*=~/jtw-tutorials/
Debugger entered--Lisp error: (cl-assertion-failed (read-ready str))
  signal(cl-assertion-failed ((read-ready str)))
  (or (read-ready str) (signal (quote cl-assertion-failed) (list (quote (read-ready str)))))
  (progn (or (read-ready str) (signal (quote cl-assertion-failed) (list (quote (read-ready str))))) nil)
  read-str("")
  (setq list (read-str str))
  (save-excursion (find-file (concat *def-dir* "class-db.el")) (setq str (buffer-substring-no-properties (point-min) (point-max))) (setq list (read-str str)) (kill-buffer nil) (warn--trim-duplicates list) list)
  load-class-db()
  (setq warn--master-list-fourthly (load-class-db))
\n]+\\)\";" nil t) (checkpoint "4") (save-excursion (checkpoint "5") (setq file-to-include (buffer-substring-no-properties (match-beginning 1) (match-end 1))) (setq line-to-include 1) (warn--get-transalpine) (setq file-stack (cons (cons file-to-include line-to-include) file-stack)) (beginning-of-line) (if (warn--inside-comment-or-string) (debug (format "file=%s" file))) (delete-region (point-at-bol) (point-at-eol)) (setq p (point)) (setq n (warn--get-location)) (setq file-old (car n)) (setq line-old (cdr n)) (setq p-prior (save-excursion (warn--goto-line line-old) (point))) (setq dif (n- (count-lines p-prior (point)))) (setq line-new (+ line-old dif)) (checkpoint "6") (progn (setq file (caar file-stack)) (setq line (cdar file-stack)) (progn (or (string= file file-to-include) (signal ... ...)) nil)) (progn (checkpoint "7") (setq ptr (assoc file file-stack)) (setq ptr2 file-stack) (while ptr2 (if (eq ... ptr) (progn ... ... ...)) (setq ptr2 (cdr ptr2)))) (checkpoint "8") (insert (format "// #1%s (setq file-stack '%s)\n" *list-namespace* (prin1-to-string file-stack))) (insert (format "// %s #location1 (%s:%d)\n" *pp-namespace* file line)) (setq m (make-marker)) (set-marker m (1+ (point))) (insert-file-contents file-to-include) (save-excursion (goto-char m) (setq file-stack (cdr file-stack)) (if file-stack (progn (setq file ...) (setq line ...) (progn ... nil) (progn ... nil) (progn ... nil) (progn ... nil)) (setq file-stack (list ...)) (setq file (caar file-stack)) (setq line (cdar file-stack))) (progn (or (string= file ...) (signal ... ...)) nil) (insert (format "// #2%s (setq file-stack '%s)\n" *list-namespace* (prin1-to-string file-stack))) (insert (format "// %s #location2 (%s:%d)\n" *pp-namespace* file line)) (set-marker m nil))))) (checkpoint "**** #9 *def-dir*=%s" *def-dir*) (set-buffer *buf*) (checkpoint "**** #8 *def-dir*=%s" *def-dir*) (checkpoint "doit:-6") (progn (set-buffer *buf*) (goto-char (point-min)) (font-lock-mode 1)) (if (fboundp (quote jtw-mode)) (jtw-mode) (java-mode)) (if (fboundp (quote jtw--meta-control-backslash)) (jtw--meta-control-backslash) (c-set-offset (quote substatement-open) 0) (setq c-basic-offset 3) (indent-region (point-min) (point-max))) (setq warn--err-msgs nil) (setq warn--outside-of-class-error nil) (setq font-lock-keywords-case-fold-search nil) (setq *current-buffer* (current-buffer)) (checkpoint "**** #7 *def-dir*=%s" *def-dir*) (setq warn--master-list-fourthly (load-class-db)) (setq warn--master-list-fourthly (warn--trim-duplicates warn--master-list-fourthly)) (checkpoint "warn--master-list-fourthly=%s" warn--master-list-fourthly) (progn (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^\\(\\(public\\|private\\|protected\\|final\\|abstract\\)[         ]+\\)*function" nil t) (setq warn--outside-of-class-error t) (warn--log-message "Error 38: Function outside of class"))) (checkpoint "doit:-4") (progn (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^\\(\\(public\\|private\\|protected\\|final\\|abstract\\)[         ]+\\)*method" nil t) (setq warn--outside-of-class-error t) (warn--log-message "Error 39: Method outside of class"))) (checkpoint "doit:-3") (progn (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^\\(\\(public\\|private\\|protected\\|final\\|abstract\\)[         ]+\\)*property" nil t) (setq warn--outside-of-class-error t) (warn--log-message "Error 40: Property outside of class"))) (checkpoint "doit:-2") (progn (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^\\(\\(public\\|private\\|protected\\|final\\|abstract\\)[         ]+\\)*classVar" nil t) (setq warn--outside-of-class-error t) (warn--log-message "Error 41: classVar outside of class"))) (checkpoint "doit:-1") (progn (set-buffer *buf*) (warn--process-list)) (checkpoint "doit:0") (save-excursion (set-buffer *buf*) (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<begin\\>" nil t) (save-excursion (forward-char -1) (if (not (warn--inside-comment-or-string)) (progn (delete-region (match-beginning 0) (match-end 0)) (insert "{")))))) (checkpoint "doit:1") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "elseif" nil t) (replace-match "else if" (quote fixedcase)))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<beginMain\\>" nil t) (save-excursion (forward-char -1) (if (not (warn--inside-comment-or-string)) (progn (delete-region (match-beginning 0) (match-end 0)) (insert "public static void main(String[] args)\n   {")))))) (checkpoint "doit:2") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<end\\>" nil t) (save-excursion (forward-char -1) (if (not (warn--inside-comment-or-string)) (progn (delete-region (match-beginning 0) (match-end 0)) (insert "}")))))) (checkpoint "doit:3") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<endMain\\>" nil t) (save-excursion (forward-char -1) (if (not (warn--inside-comment-or-string)) (progn (delete-region (match-beginning 0) (match-end 0)) (insert "}")))))) (checkpoint "doit:4") (setq indent-tabs-mode nil) (java-mode) (setq c-basic-offset 3) (c-set-offset (quote substatement-open) 0) (setq c-basic-offset 3) (setq indent-tabs-mode nil) (font-lock-fontify-buffer) (indent-region (point-min) (point-max)) (let (p1 p2 str form type variable T var start stop step-size step-size-2 this_start this_stop this_step this_step_size file line p-prior beg0 end0) (setq strobe nil) (checkpoint "2") (save-excursion (goto-char (point-min)) (setq *superfor* 0) (while (re-search-forward "\\<superfor\\>" nil t) (setq beg0 (match-beginning 0)) (setq end0 (match-end 0)) (font-lock-fontify-buffer) (if (save-excursion (let (...) (unwind-protect ... ...))) (progn (setq *current-buffer* (current-buffer)) (setq p1 beg0) (progn (or ... ...) nil) (setq p2 (save-excursion ... ...)) (setq str (buffer-substring-no-properties end0 p2)) (setq form (read-str str)) (progn (or ... ...) nil) (message "*** form=%s" form) (delete-region p1 p2) (setq *superfor* (1+ *superfor*)) (setq this (format "superfor_%d_" *superfor*)) (if (not ...) (progn ... ...)) (if (eq ... ...) (progn ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))))))) (progn (checkpoint "3") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*method\\>") nil t) (if (not (looking-at "[         ]+[A-Za-z_][A-Za-z0-9_]*[         ]+[A-Za-z_][A-Za-z0-9_]*(")) (warn--log-message "Error 1: Method needs a return type")))) (checkpoint "4") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^[         ]*\\([a-z]+\\.\\)*[A-Z][a-zA-Z0-9_]*[         ]+[a-z][a-zA-Z0-9_]*" nil t) (save-excursion (forward-line -1) (warn--log-message "Error 35: Keyword var missing")))) (checkpoint "doit:6") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*function\\>") nil t) (if (string= "interface" (car (warn--find-enclosing-class))) (warn--log-message "Error 42: Function cannot be present in an interface") (if (not (looking-at "[         ]+[A-Za-z_][A-Za-z0-9_]*[         ]+[A-Za-z_][A-Za-z0-9_]*(")) (warn--log-message "Error 2: Function needs a return type"))))) (checkpoint "doit:7") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "constructor[         ]+\\([A-Za-z0-9]*\\)" nil t) (if (not (warn--inside-comment-or-string)) (progn (setq ctor-class (buffer-substring-no-properties ... ...)) (setq encl-class (cdr ...)) (if (not ...) (warn--log-message ...)))))) (save-excursion (goto-char (point-min)) (while (< (point) (point-max)) (beginning-of-line) (font-lock-fontify-buffer) (if (warn--re-search-forward--no-strings-no-comments "\\<constructor\\>" (point-at-eol) t) (progn (if (not ...) (progn ... ... ... ... ... ... ... ...)))) (if (warn--re-search-forward--no-strings-no-comments "\\<property\\>" (point-at-eol) t) (progn (if (not ...) (progn ... ... ... ...)))) (beginning-of-line) (if (warn--re-search-forward--no-strings-no-comments "\\<classVar\\>" (point-at-eol) t) (progn (if (not ...) (progn ... ... ... ...)))) (beginning-of-line) (if (warn--re-search-forward--no-strings-no-comments "\\<method\\>" (point-at-eol) t) (progn (if (not ...) (progn ... ...)))) (forward-line 1))) (checkpoint "doit:9") (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "^   \\([a-z]+\\)" nil t) (if (and (not (save-excursion ... ...)) (not (save-excursion ... ...)) (not (save-excursion ... ...)) (not (save-excursion ... ...)) (not (save-excursion ... ...)) (not (save-excursion ... ...))) (progn (save-excursion (beginning-of-line) (checkpoint "doit:9b") (warn--log-message ...)))))) (if (not warn--outside-of-class-error) (progn (progn (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<function\\>" nil t) (setq *current-buffer* (current-buffer)) (save-excursion (if ... ...)))))) (if (not warn--outside-of-class-error) (progn (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<constructor\\>" nil t) (save-excursion (if ... ...)))))) (checkpoint "doit:12") (if (not warn--outside-of-class-error) (progn (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<method\\>" nil t) (save-excursion (if ... ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<property\\>" nil t) (if (not (warn--inside-comment-or-string)) (progn (beginning-of-line) (forward-line 1) (if (looking-at "^[         ]+{") (warn--log-message ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<classVar\\>" nil t) (if (not (warn--inside-comment-or-string)) (progn (beginning-of-line) (forward-line 1) (if (looking-at "^[         ]+{") (warn--log-message ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "if[         ]+" nil t) (if (not (warn--inside-comment-or-string)) (progn (if (not ...) (warn--log-message "Error 23: Expecting ( after if statement")) (condition-case err (forward-sexp 1) (error ...)) (warn--skip-whitespace) (if (not ...) (warn--log-message ...)))))) (save-excursion (goto-char (point-min)) (setq count 0) (while (warn--re-search-forward--no-strings-no-comments "[{}]" nil t) (save-excursion (if (warn--inside-comment-or-string) (error "warn--inside-comment-or-string") (setq str (buffer-substring-no-properties ... ...)) (if (string= str "{") (setq count ...)) (if (string= str "}") (setq count ...)) (if (< count 0) (warn--log-message "Error 26: More ends than begins"))))) (if (> count 0) (progn (goto-char (point-max)) (warn--log-message "Error 27: Missing ends at the end of the file")))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*method\\>") nil t) (setq end (save-excursion (warn--re-search-forward--no-strings-no-comments ")" nil t) (end-of-line) (point))) (if (and (string= (car ...) "class") (save-excursion (beginning-of-line) (not ...)) (save-excursion (beginning-of-line) (warn--re-search-forward--no-strings-no-comments ";" end t))) (warn--log-message "Error 28: Spurious semicolon at the end of the line")))) (save-excursion (goto-char (point-min)) (if (warn--re-search-forward--no-strings-no-comments "\\<public static void main(String\\[\\] args) {" nil t) (progn (beginning-of-line) (setq beg (point)) (setq end (save-excursion (warn--re-search-forward--no-strings-no-comments "{" nil t) (condition-case err ... ...) (point))) (setq class (cdr (warn--find-enclosing-class))) (while (warn--re-search-forward--no-strings-no-comments "[^.a-zA-Z0-9_]\\([a-z][A-Za-z0-9_]*\\)[         ]*(" end t) (if (not ...) (progn ... ... ... ... ... ... ... ... ... ...))) (goto-char beg) (while (warn--re-search-forward--no-strings-no-comments (concat "\\<\\([A-Z]+[a-z][A-Za-z0-9]*\\)" "\\.\\([a-z][A-Za-z0-9]*\\)[         ]*(") end t) (if (not ...) (progn ... ... ... ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*function\\>") nil t) (beginning-of-line) (forward-line 1) (if (looking-at "^   {") (progn (setq beg (point)) (setq end (save-excursion ... ...)) (setq class (cdr ...)) (while (and ... ...) (while ... ...)) (goto-char beg) (while (warn--re-search-forward--no-strings-no-comments ... end t) (if ... ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*method\\>") nil t) (beginning-of-line) (forward-line 1) (if (looking-at "^   {") (progn (setq beg (point)) (setq end (save-excursion ... ...)) (setq class (cdr ...)) (while (warn--re-search-forward--no-strings-no-comments ... end t) (if ... ...)))))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments (concat "^   \\(\\(abstract\\|final\\|" "private\\|protected\\|public\\)" "[         ]+\\)*constructor\\>") nil t) (beginning-of-line) (forward-line 1) (if (looking-at "^   {") (progn (setq beg (point)) (setq end (save-excursion ... ...)) (setq class (cdr ...)) (while (warn--re-search-forward--no-strings-no-comments ... end t) (setq c-call ...) (setq m-call ...) (end-of-line) (forward-char -1) (prin1-to-string ...) (if ... ...)))))) (setq stage 1) (if (= 0 (length warn--err-msgs)) (progn (save-excursion (goto-char (point-min)) (setq case-fold-search nil) (while (warn--re-search-forward--no-strings-no-comments (concat "^[ ][ ][ ][ ][ ][ ][ ]*\\(" "\\(superfor\\|for\\|while\\)[         ]*(\\)?" "\\(boolean\\|char\\|float\\|" "double\\|int\\|long\\|short\\|" "[A-Z]\\|[A-Z]+[a-z][a-zA-Z0-9]*\\)" "\\([][]*\\)[         ]+" "\\([a-z][A-Za-z0-9]*\\)") nil t) (save-excursion (setq n3 ...) (setq n5 ...) (setq peek ...) (setq post ...) (beginning-of-line) (forward-line -1) (setq stage 2) (warn--log-message "Error 35: Keyword var missing")))) (save-excursion (goto-char (point-min)) (while (warn--re-search-forward--no-strings-no-comments "\\<var\\>" nil t) (if (not ...) (progn ...))))))) ...)
  doit()
  call-interactively(doit nil nil)
  command-execute(doit)
  command-line-1(("--eval" "(setq *prefix* \"/usr\")" "--eval" "(setq *stump* \"MyFirstProgram\")" "--load" "/usr/share/emacs/site-lisp/dlisp/jtw-build-jtw.el" "--funcall" "doit"))
  command-line()
  normal-top-level()

make: *** [MyFirstProgram.java] Error 255


I have no idea of what's really going on here, but the emacs debugger has flagged the routine, (cl-assertion-failed (read-ready str)), as the culprit.  This is out of my league here, so I'm requesting assistance in correcting this bug.

Bug 3


This bug is very trivial in my eyes, and does not really affect the user.  The uninstall script throws an Error 255 upon a successful uninstall, but I don't know why?  This is what I see:

emacs --batch --load install-stuff/jtw-install-and-uninstall.el --funcall do-uninstall
Type C-x 1 to delete the help window, C-M-v to scroll help.
Provided feature diagnose
Provided feature directory-files-deep
Enter installation prefix dir (press y or enter for /usr):
You chose prefix = `/usr'
About to do: rm -rfv /usr/share/emacs/site-lisp/dlisp
About to do: rm -fv  manual/jtw-manual.info
About to do: rm -rfv manual/jtw
(Shell command succeeded with no output)
About to do: rm -fv /usr/share/info/jtw-manual.info
(Shell command succeeded with no output)
About to do: rm -rfv /usr/share/java-training-wheels
About to do: rm -rfv /usr/share/doc/jtw
*** d-unsplat-file-dir on file /usr/share/info/dir
Saving file /usr/share/info/dir...
Wrote /usr/share/info/dir

Beginning of buffer
make: *** [uninstall] Error 255



Last thing to note


There is no mailing list for J.T.W.; can you add one?  That way, all correspondences between you and the users of J.T.W. can be made public and can further encourage a community to form around J.T.W. hence creating more support.  Said support could decrease the amount of work you'll have to do in the long run as a GNU Maintainer, since you'll have a community as your team.

Michael Pagan <pegzmasta>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #39351:  jtw-install-and-uninstall.patch added by pegzmasta (962B - text/x-patch - Patch file for jtw-install-and-uninstall.el)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by davin_pearson (Posted a comment)
  • -email is unavailable- added by pegzmasta (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-03 pegzmasta Attached File- Added jtw-install-and-uninstall.patch, #39351

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code