-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial import/port #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
non
added a commit
that referenced
this pull request
Aug 8, 2013
So, I went ahead and cleaned up the tests a bit, which included adding a bunch of ScalaCheck properties. As soon as I did, the bugs started popping out of the woodwork. There were three major classes of bugs: 1. Zero coefficient terms ending up in the map 2. Generating terms with the same degree via Map#map 3. Everything else Type #1 was the most common. I ended up making the default constructor private, and adding a factory method that removes zeros from the map before calling new. I also added a few other strategic filters. Type #2 caused problems with multiplication, and would potentially have caused problems with the Iterable[Term[C]] constructor as well. The issue here is essentially: Map(1 -> 9, 3 -> 6) map { case (k, v) => (k % 2, v) } This returns Map(1 -> 6), since it discards the earlier (1, 9) tuple. Obviously this caused us some problems. Type #3 just encompassed everything else. The most notable bug here was an issue when dividing by constants, where quotMod would hit a divide-by-zero bug. I just special-cased that, which appeased ScalaCheck. There may be a more principled solution.
VladUreche
referenced
this pull request
in miniboxing/spire
Feb 21, 2014
non
added a commit
that referenced
this pull request
Aug 2, 2014
This commit is mostly to try to clean up the documentation and some code formatting a bit. Apologies to @denisrosset -- I saw some of my own code which I no longer like the look of and wanted to fix. There are a few major changes, however. One is that I did some refactoring to remove the .asInstanceOf calls. Since this is a bit of a shift away from the previous code patterns in Interval I wanted to explain the rationale. Previously, the style was to always define all the logic in the parent trait (e.g. Interval[A]). I find this style really elegant and readable. However, there are (at least) two problems with it: 1. Broadest return type in all cases 2. Potential slowness with lots of cases In this case #1 was causing problems. Starting from a Bounded interval, we were losing track of the fact that lowerBound and upperBound would return ValueBounds (since the generic implementations only guarantee Bound[A]). I refactored Interval to require each subtype to define those methods, allowing more precise return types. From there, Bound[A] * Bound[A] only guarantees a Bound[A]. This was a bit more challenging, but I added methods +~, -~, *~, and /~ which, for two ValueBound[A] values, guarantee the result to be a ValueBound[A] as well (they should also be a bit faster). There's obviously a tension here -- I don't want to rewrite all the interval code away from the current (nice) style. But in some cases being more precise about return types (and not losing type information) will help us have more efficient (and more direct) code. Review by @denisrosset.
Closed
JoeWrightss
pushed a commit
to JoeWrightss/spire
that referenced
this pull request
Apr 13, 2019
Turns out that everything works, the only problem is that the server's configurable is not passed to the CA manager when it is initialized. This change does just that. It also sets this option by default in the dev config, which should alleviate some hardships around server restarts. Fixes typelevel#420 ``` Received 1 bundle after 7.326471ms SPIFFE ID: spiffe://example.org/test SVID Valid After: 2018-04-10 23:47:17 +0000 UTC SVID Valid Until: 2018-04-10 23:48:18 +0000 UTC CA typelevel#1 Valid After: 2018-04-10 23:47:06 +0000 UTC CA typelevel#1 Valid Until: 2018-04-11 00:47:16 +0000 UTC CA typelevel#2 Valid After: 2018-02-09 23:20:33 +0000 UTC CA typelevel#2 Valid Until: 2023-02-08 23:20:33 +0000 UTC ``` Signed-off-by: Evan Gilman <evan@scytale.io>
armanbilge
referenced
this pull request
in armanbilge/spire
Oct 19, 2021
Improve `cfor` / `fastFor` semantics, docs
armanbilge
added a commit
that referenced
this pull request
Oct 20, 2021
Armanbilge update/scalafmt 3.0.6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original Rational implementation and I ported the tests over to ScalaTest.