We're updating the issue view to help you get more done. 

Classes generated by deftype and defrecord don't play nice with .getPackage

Description

Classes generated loaded by DynamicClassLoader return nil for .getPackage. Tools like CIDER and vim-fireplace are relying on this information to implement things like completion hints.

1 2 3 4 5 (.getPackage String) ;; => #<Package package java.lang, Java Platform API Specification, version 1.7> (deftype T []) (.getPackage T) ;; => nil

Proposed: During DynamicClassLoader.defineClass(), invoke definePackage() on the class being defined (similar to what URLClassLoader does).

Patch: clj-1550-v4.patch

Screened by: Alex Miller

Environment

None

Status

Assignee

Unassigned

Reporter

Bozhidar Batsov

Labels

Approval

Incomplete

Patch

Code and Test

Fix versions

Affects versions

Release 1.8
Release 1.7
Release 1.6

Priority

Minor