.DollarNames.R6(), avoid use ofNextMethod(). This is to work around a compatibility issuewith RStudio IDE. (#299)R6 methods no longer recommendsinitialize or.__enclos_env__ in autocomplete.
The deprecatedlock parameter has beenremoved.
R6Class() now prints a message when afinalize method is public instead of private.
When a superclass is not cloneable, then subclasses cannot becloneable (
Fixed #253: Errors could occur when deep cloning if a memberobject was an environment with a class that had a$ method.Deep cloning now usesget0() instead of$. R6now requires R >= 3.2. (
Suggests section inDESCRIPTION.Resolved #195: Slightly clearer message when there is an error intheinitialize() method.
Fixed #214: When a non-portable object inheritance was cloned,methods that were inherited (and not overridden) had the wrongenvironment. (#215, #217)
Printing R6 objects, no longer includes.__active__.
as.list.environment(), which would return the activebinding’s function definition rather than the value from invoking thefunction. In R 4.0, the behavior will chang so that it returns thevalue. R6 now no longer relies on this buggy behavior. (#192)Fixed #146: Finalizers can now be private methods.(#181)
Fixed #167: Finalizers now run on cloned objects. (#180)
Vignettes are no longer included as part of the source packagebecause of their large size. Documentation is now athttps://r6.r-lib.org/.
Fixed #125: Theprint.R6 method now always returnsthe object that was passed to it.
Fixed #155: In some cases, a cloned object’s methods could referto the wrongsuper object. (#156)
Fixed #94, #133: When cloning an object which contained afunction that isnot a method, the corresponding function inthe new object would have its environment changed, as though it were amethod. Now it no longer has a changed environment. (#156)
Fixed #121: If afinalize method was present, itwould prevent objects passed toinitialize from gettingGC’d.
Fixed #158: If a$set method of an R6 generatorobject is given the valueNULL, it previously removed thenamed item. Now it adds the named item with the valueNULL.
Fixed #159: Printing an R6 object containing a large vector wasslow.
Fixed #108: When an object with asuper object andan active binding in thesuper object was cloned, the newobject’ssuper object did not get the active binding – itwas a normal function.
Fixed #119: When a class had two levels of inheritance, aninstance of that class’ssuper object could contain methodsthat had an incorrect enclosing environment.
Vignettes now only try use the microbenchmark package if it ispresent. This is so that the package builds properly on platforms wheremicrobenchmark is not present, like Solaris.
Fixed ending position fortrim().
Classes can define finalizers explicitly, by defining a publicfinalize method. (#92, #93)
Added functionis.R6() andis.R6Class(). (#95)
Fixed #96: R6 now avoids using$ and[[after the class has been assigned to the object. This allows the user toprovide their own methods for$ and[[ withoutcausing problems to R6’s operation.
Theplot S3 method for R6 objects will call$plot on the object if present. (#77)
Fixed printing of members that are R6 objects. (#88)
Fixed deep cloning for non-portable classes. (#85)
Addedas.list.R6 method. (#91)
Implementedformat.R6() andformat.R6ClassGenerator, the former calls a publicformat method if defined. This might change thefunctionality of existing classes that define a publicformat method intended for other purposes (#73. Thanks toKirill Müller)
Functions are shown with their interface inprintandformat, limited to one line (#76. Thanks to KirillMüller)
R6 objects and generators print out which class they inheritfrom. (#67)
Fixed a bug with printing R6 objects when a[[method is defined for the class. (#70)
Fixed cloning of objects that call asuper methodwhich accessesprivate. (#72)
Added support for making clones of R6 objects with aclone() method on R6 objects. Thedeep=TRUEoption allows for making clones that have copies of fields withreference semantics (like other R6 objects). (#27)
Allow adding public or private members when there were no publicor private members to begin with. (#51)
Previously, when an R6 object was printed, it accessed (andcalled) active bindings. Now it simply reports that a field is an activebinding. (#37, #38. Thanks to Oscar de Lama)
Printing private members now works correctly for portable R6objects. (#26)
The ‘lock’ argument has been renamed to ‘lock_objects’. Also,there is a new argument, ‘lock_class’, which can prevent changes to theclass. (#52)
Fixed printing of NULL fields.
A superclass is validated on object instantiation, not on classcreation.
Addeddebug andundebug methods togenerator object.
[BREAKING CHANGE] Addedportable option, whichallows inheritance across different package namespaces, and made it thedefault.
Addedset() method on class generator object, so newfields and methods can be added after the generator has beencreated.
All of the functions involved in instantiating objects areencapsulated in an environment separate from the R6 namespace. Thismeans that if a generator is created with one version of R6, saved, thenrestored in a new R session that has a different version of R6, thereshouldn’t be any problems with compatibility.
Methods are locked so that they can’t be changed. (Fixes#19)
Inheritance of superclasses is dynamic; instead of reading in thesuperclass when a class is created, this happens each time an object isinstantiated. (Fixes #12)
Added trailing newline when printing R6 objects. (Thanks to GaborCsardi)
Theprint method of R6 objects can be redefined.(Thanks to Gabor Csardi)
First release on CRAN.
Removed pryr from suggested packages.