ClojureScript

Missing warning when assigning namespaces via def

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.7.145
  • Fix Version/s: 1.9.671
  • Component/s: None
  • Labels:
    None

Description

Currently you can assign a Closure namespace to a var without getting a warning.

Minimal sample:

(ns import-names.core
  (:import [goog debug]))

(def debug goog.debug)

Activity

Hide
David Nolen added a comment -

The example case is a bit complected. Besides importing a name that matches a def you are also assigning a google closure namespace to a local. This will likely cause problems on its own. We need more information.

Show
David Nolen added a comment - The example case is a bit complected. Besides importing a name that matches a def you are also assigning a google closure namespace to a local. This will likely cause problems on its own. We need more information.
Hide
Sebastian Bensusan added a comment - - edited

We should check that :require ed and :import ed namespaces are not used as values and then warn about it.

Show
Sebastian Bensusan added a comment - - edited We should check that :require ed and :import ed namespaces are not used as values and then warn about it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: