Actions
Architecture #8614
closedUtility to get all objects from a sealed trait
Status:
Released
Priority:
3
Assignee:
Category:
Architecture - Dependencies
Target version:
Fix check:
Regression:
Description
We need all the time to get all objects from a sealed trait when they denote an Algebraic Data Structure (a super enum).
There is this magic macro which works on both Scala 2.10 and 2.11 and do exactly that: https://github.com/mrvisser/sealerate
Just add AT THE END of the hierachy :
def values: Set[MyTrait] = sealerate.values[MyTrait]
That's all. Values never unsynchonized ever again.
The dependency to add is:
<!-- Utility to generate all case of a sealed base class --> <dependency> <groupId>ca.mrvisser</groupId> <artifactId>sealerate_${scala-binary-version}</artifactId> <version>0.0.4</version> </dependency>
And we don't need it before 3.1 because no refactoring in 2.11 (but for ex. the new quicksearch in #8563, or password for Aix in #8593 takes advantage of it)
Updated by François ARMAND over 8 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-parent-pom/pull/23
Updated by François ARMAND over 8 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset parent-pom|be6cdb7b7811a71f470d03d24be9249fc581ebc6.
Updated by Alexis Mousset over 8 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.12 and 3.2.5 which were released today.
- 3.1: Announce Changelog
- 3.2: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Actions