kaveh808 / kons-9

Common Lisp 3D Graphics Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newbie struggling to compile

jdf-id-au opened this issue · comments

Thanks for this exciting project.

I'm familiar with Clojure but new to CL. (macOS 12.5.2 on arm64; sbcl 2.2.8)

I followed the instructions but couldn't get the project to compile, with the following error. It survived a REPL restart. Am I doing something wrong?

; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Package U does not exist.
;   
;       Line: 197, Column: 89, File-Position: 8194
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /Users/jdf/Projects/Learning/kons-9/src/plugins/uv-mesh.lisp" {700CBB0223}>

debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {7005213C23}>:
  COMPILE-FILE-ERROR while
  compiling #<CL-SOURCE-FILE "kons-9" "src/plugins/uv-mesh">

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "kons-9" "src/plugins/uv-mesh">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "kons-9" "src/plugins/uv-mesh">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT                        ] Give up on "kons-9"
  7: [REGISTER-LOCAL-PROJECTS      ] Register local projects and try again.
  8:                                 Exit debugger, returning to top level.

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "kons-9" "src/plugins/uv-mesh">)))
; File has been modified since compilation:
;   SYS:CONTRIB;ASDF;UIOP.LISP.NEWEST
; Using form offset instead of character position.

   source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
                  :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)

main is not currently compiling for me, either. I'll look into it.

@kaveh808, this isn't the first time a fresh pull of main has failed to compile. We might want to consider instituting some testing discipline around merges to main.

Because of the stateful nature of Lisp images, and the tendency to build up state incrementally, interactively, it's relatively easy in a Common Lisp project to get into states where your running image works, but a fresh build doesn't. We can prevent that by following a discipline something like this:

  • always work in a branch until what you're working on is ready to be merged to main
  • before merging to main or issuing a pull request, always do a fresh build and load from a cold start
  • create and maintain a set of sanity tests to ensure that main builds, loads, and runs; always run the tests before and after merging
  • if the build, the load, or the tests break after merging, back out the merge and fix before trying to merge to main again

huh, that should have been caught in the review. That's some left over debugging crap. Just remove the (u:fp whatever) and replace with whatever. Hard for me to catch those since it's always loaded.

The latest commit that builds on my Mac is:

0af5cd3

All commits later than that one fail to build because of the type error in transform.lisp.

@jdf-id-au, can you try pulling commit 0af5cd3 to see if it builds for you?

huh, that should have been caught in the review. That's some left over debugging crap. Just remove the (u:fp whatever) and replace with whatever. Hard for me to catch those since it's always loaded.

I guess we'd better institute the testing discipline that I mentioned, then, and make sure PRs don't get merged until they pass their tests.

mikel that should be p* instead of p:, I think some stuff got messed up when I rebased before requesting a pull.
a p
is for multiplying points against points or numbers, and p:* is only for points. ugh, stupid markdown.

mikel that should be p* instead of p:*, I think some stuff got messed up when I rebased before requesting a pull.

I'll try it; thanks.

The p:star just avoids a function indirection and typecase, so should be faster than just pstar, but only multiplies points.

I grabbed a new copy and took out my utils package, those two changes make the compile work.

I grabbed a new copy and took out my utils package, those two changes make the compile work.

If you push your changes to a branch somewhere that I can pull from, I'll test them.

sure, will do.

https://github.com/JMC-design/kons-9/tree/point-fix

I pulled it and tested it. It compiles and loads on my system, the window behaves as expected, and the first several forms in demo-kernel.lisp work as expected.

I recommend issuing a PR for it. Thanks, @JMC-design

@jdf-id-au, try pulling main now. @JMC-design provided fixes that are now mereged with main. If you still have problems, let us know and we'll see what we can do to help.

Wow thank you, build now works! I've definitely been burned by repl ≠ repo in the past too.

Wow thank you, build now works! I've definitely been burned by repl ≠ repo in the past too.

Great, @jdf-id-au ; I'm closing the issue, then. Thanks for letting us know.