Giter Site home page Giter Site logo

gadgets's People

Contributors

bnmcgn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

gadgets's Issues

Some systems failed to build for Quicklisp dist

Building with SBCL 2.0.5 / ASDF 3.3.1 for quicklisp dist creation.

Trying to build commit id 58c9505

gadgets fails to build with the following error:

; caught ERROR:
;   READ error during COMPILE-FILE: Package SPLIT-SEQUENCE does not exist. Line: 245, Column: 48, File-Position: 9209 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/gadgets/c8761e662f4bd76adb2ec21773bf71a7dcd9c03b/gadgets-20210402-git/gadgets.lisp" {1007C6E3E3}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1000A10083}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "gadgets" "gadgets">

test-gadgets fails to build because of a failure in gadgets.

Full log here

Issues in the tests in t/test-gadgets.lisp

  1. The test with do-hash-table effectively assumes that do-hash-table scans the table in a specific order, but do-hash-table uses alexandria:hash-table-keys, which does not return the keys in a specific order, so it sometimes fails and sometimes doesn't.

  2. The test for use-package-with-shadowing assuming that the call to use-package-with-shadowing happens before reading the symbols in the following forms. That is true wen you load the source file, but not if you compile the file and load it, in which case the reading happens at compile time, and the call later at load time. It is better to do the reading at runtime e.g.

                    (is 2 (symbol-value (read-from-string "test1::var1")))
  1. Not really a problem, but make it easier to deal with errors: the macro prove-test:is is expecting the test form to be the first argument, and the expected result to be the second argument, so the for above should really be:
                    (is  (symbol-value (read-from-string "test1::var1"))  2)

When the form is first argument, if it causes an error it catches it and goes on the following tests. When it is second, it enters the debugger.

Implementation-indpendent string-unless-number

gadgets:string-unless-number currently uses conditionalization, which limits where it works. I think the following code would do what is required using onlu common-lisp:

(defun string-unless-number (x)
  "Return the input as a string unless it can be recognized as an integer."
  (if (numberp x)
      x
    (if (stringp x)
        (or (ignore-errors (parse-integer x)) x)
      (error "STRING-UNLESS-NUMBER: argument is not a number or a string : ~s" x))))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.