ClojureScript

Failure with alias and bad require of clojure.spec

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: 1.9.854
  • Fix Version/s: 1.9.908
  • Component/s: None
  • Labels:
  • Patch:
    Code
  • Approval:
    Accepted

Description

Try these two forms in succession with a QuickStart JAR node REPL:

(require '[clojure.spec :as s])
(require '[clojure.spec.alpha :as s])

The second will cause an error clojure.lang.ExceptionInfo: Alias s already exists in namespace cljs.user, aliasing clojure.spec

This does not occur with 1.9.671

Activity

Hide
António Nuno Monteiro added a comment -

Patch attached with fix.

Summary of the fix:

When we moved from the REPL special `require` last year to the new `:ns*` require, we stopped backing up the compiler state for requires and imports. The patch adds backing up of the compiler state and restores it if an analysis error occurs.

Show
António Nuno Monteiro added a comment - Patch attached with fix. Summary of the fix: When we moved from the REPL special `require` last year to the new `:ns*` require, we stopped backing up the compiler state for requires and imports. The patch adds backing up of the compiler state and restores it if an analysis error occurs.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: