hargettp / hh-web

Framework for building modern web applications in Lisp
MIT License
36 stars 4 forks source link

Symbol conflict #6

Closed fade closed 10 years ago

fade commented 10 years ago

I have begun playing with hh-web. Nice stuff. I've been sort of lusting at polymer and angular for a little while; it's cool to see that somebody in the lisp world got here first. Anyhow, I have noticed a few things.

  1. when I (hh-web:make-skeleton :for :acme :in "/home/me/asdf/path/acme/") the generated system does not make an urls.lisp file, so when I do (start-httpd-server) and go to the root uri of that system, I get the error: "SIMPLE-ERROR There is no applicable method for the generic function # when called with arguments (NIL). "
  2. when I load the system that resulted from the make-skeleton form, there is a symbol conflict between hh-web and a swank component: "USE-PACKAGE #<PACKAGE "HH-WEB"> causes name-conflicts in

    <PACKAGE "SWANK-TRACE-DIALOG"> between the following symbols:

    HH-WEB:ID, SWANK-TRACE-DIALOG::ID [Condition of type NAME-CONFLICT]"

... when I continue with 1: [TAKE-NEW], the system loads, but the ramifications are probably not so good for swank-trace. I guess maybe this is two issues. Let me know if you want a separate ticket for one. Thanks!

fade commented 10 years ago

Oh, also, the generated system ends up in /home/me/asdf/path/acme/acme/ which is probably not right. Please let me know if I can provide any more information.

hargettp commented 10 years ago

Hey, thanks for the interest!

And sounds like 2 folks with related issues...

Actually, the acme/acme path is correct, based on the way you invoked make-skeleton: it expects to create a directory for your package underneath the one you describe.

Is there no urls.lisp in that subdirectory?

hargettp commented 10 years ago

What additional packages are you loading?

A fellow githubber had a similar issue in #5, and it seemed that using bleeding edge Slime might not be safe. I focus on making sure that hh-web works with the Quicklisp ecosystem; beyond that is difficult too support.

fade commented 10 years ago

I figured out the pathing issue, which is common also in quickproject. I am not loading any packages that aren't called in by hh-web or the system that make-skeleton defines. On line 114 of skeleton.lisp (format os " (:file \"urls\")~%") is commented out in the hh-web repository. I uncommented this form and the urls.lisp file is created by make-skeleton, so that problem is kind of fixed. Interestingly, even after I uncomment the form allowing for urls.lisp to be created, starting the webserver and going to the root results in:

SIMPLE-ERROR There is no applicable method for the generic function # when called with arguments (NIL).

and in the REPL, I see:

[2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::CACHE-ITEM is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::CACHE-ITEM is defined but never used. 127.0.0.1 - [2014-04-06 12:49:15] "GET / HTTP/1.1" 200 374 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0" [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::CACHE-ITEM is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::CACHE-ITEM is defined but never used. 127.0.0.1 - [2014-04-06 12:49:15] "GET /favicon.ico HTTP/1.1" 200 1820 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0"

which looks like a slightly non-obvious problem. I initially used the version of hh-web (and slime and everything else) in quicklisp, but I checked out the hh-web git repo in my asdf path, and the same issues occur. I did not change the slime version loaded in my emacs setup. looking inside the quicklisp dist, it seems to be version 2.4.

fade commented 10 years ago

so, having perused #5, I see my issue is identical, so this is a dupe. :( That said, it is persistent. An interesting (to me) fact: loading hh-web itself goes perfectly. there is no symbol conflict. loading the generated hh-web project, the symbol conflict arises.

hargettp commented 10 years ago

Yep, it is, isn't it?

Do you mind subscribing to #5? I'll dig deeper to understand the issue on that one.

And thanks again for your interest!

fade commented 10 years ago

Awesome. Thanks. subscribed.

hargettp commented 10 years ago

Closing as dupe.

hargettp commented 10 years ago

One outstanding item: urlls.lisp. I need to think through why it may have been commented out, but I expect it to make no difference. There is file reloading machine in here, and that's one of the files that gets reloaded, so it may not matter if its loaded initially or not. I will give that some thought.

Davidbhodge commented 10 years ago

Yes.

This is my problem exactly.

The symbol conflict and the "simple error" are two separate issues, IMO

Sent from my iPad

On 7 Apr, 2014, at 0:54, fade notifications@github.com wrote:

I figured out the pathing issue, which is common also in quickproject. I am not loading any packages that aren't called in by hh-web or the system that make-skeleton defines. On line 114 of skeleton.lisp (format os " (:file \"urls\")~%") is commented out in the hh-web repository. I uncommented this form and the urls.lisp file is created by make-skeleton, so that problem is kind of fixed. Interestingly, even after I uncomment the form allowing for urls.lisp to be created, starting the webserver and going to the root results in:

SIMPLE-ERROR There is no applicable method for the generic function # when called with arguments (NIL).

and in the REPL, I see:

[2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::PATTERN is defined but never used. [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::CACHE-ITEM is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::CACHE-ITEM is defined but never used. 127.0.0.1 - [2014-04-06 12:49:15] "GET / HTTP/1.1" 200 374 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0" [2014-04-06 12:49:15 [WARNING]] The variable HH-WEB::CACHE-ITEM is defined but never used. [2014-04-06 12:49:15 [WARNING]] Warning while processing connection: The variable HH-WEB::CACHE-ITEM is defined but never used. 127.0.0.1 - [2014-04-06 12:49:15] "GET /favicon.ico HTTP/1.1" 200 1820 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0"

which looks like a slightly non-obvious problem. I initially used the version of hh-web (and slime and everything else) in quicklisp, but I checked out the hh-web git repo in my asdf path, and the same issues occur. I did not change the slime version loaded in my emacs setup. looking inside the quicklisp dist, it seems to be version 2.4.

— Reply to this email directly or view it on GitHub.