Bug 16662 - exportClasses() directive silently ignores missing S4 classes
Summary: exportClasses() directive silently ignores missing S4 classes
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Installation (show other bugs)
Version: R 3.2.2
Hardware: All All
: P5 minor
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-01-11 09:28 UTC by Alex Bertram
Modified: 2016-01-11 09:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Bertram 2016-01-11 09:28:52 UTC
When running install_package(), undefined S4 classes declared in the NAMESPACE are silently ignored.

For example, 

exportClasses(THIS_CLASS_DOES_NOT_EXIST)

is not treated as an error. 

There is at least one package in CRAN affected:
https://github.com/cran/smoothSurv/blob/7e4a7c30ff856bf4028924f82345139cf2924b55/NAMESPACE#L23

This package does not use S4 at all, so it clearly an error. 

To be consistent with export(), exportClasses() should throw an error upon encountering an invalid class.