Skip to content
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

Iso and iso generation #270

Merged
merged 11 commits into from
Sep 13, 2017
Merged

Iso and iso generation #270

merged 11 commits into from
Sep 13, 2017

Conversation

nomisRev
Copy link
Member

No description provided.

NigelHeylen and others added 10 commits September 12, 2017 08:56
Iso law
Iso, Lens and Prism identity
Rewrote lenses generator to work with special case package name and nested generics
Added some functions to Iso
Renamed AnnotatedElement to avoid confusion
@nomisRev nomisRev requested review from raulraja, pakoito and a team September 12, 2017 17:49
@codecov-io
Copy link

codecov-io commented Sep 12, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@6da6d8c). Click here to learn what that means.
The diff coverage is 36.92%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #270   +/-   ##
=========================================
  Coverage          ?   42.13%           
  Complexity        ?      296           
=========================================
  Files             ?      144           
  Lines             ?     3401           
  Branches          ?      411           
=========================================
  Hits              ?     1433           
  Misses            ?     1842           
  Partials          ?      126
Impacted Files Coverage Δ Complexity Δ
...or/src/main/java/kategory/optics/AnnotationInfo.kt 0% <ø> (ø) 0 <0> (?)
...r/src/main/java/kategory/optics/AnnotatedDomain.kt 0% <ø> (ø) 0 <0> (?)
...c/main/java/kategory/optics/LensesFileGenerator.kt 0% <0%> (ø) 0 <0> (?)
...c/main/java/kategory/optics/PrismsFileGenerator.kt 0% <0%> (ø) 0 <0> (?)
...r/src/main/java/kategory/optics/OpticsProcessor.kt 0% <0%> (ø) 0 <0> (?)
...src/main/java/kategory/optics/IsosFileGenerator.kt 0% <0%> (ø) 0 <0> (?)
.../main/java/kategory/common/utils/ProcessorUtils.kt 0% <0%> (ø) 0 <0> (?)
...ory-optics/src/main/kotlin/kategory/optics/Lens.kt 66.66% <33.33%> (ø) 6 <0> (?)
...ry-optics/src/main/kotlin/kategory/optics/Prism.kt 70% <33.33%> (ø) 11 <0> (?)
...gory-test/src/main/kotlin/kategory/laws/IsoLaws.kt 65.11% <65.11%> (ø) 7 <7> (?)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6da6d8c...3e23c4f. Read the comment docs.

@@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinVersion"
compile project(':kategory-annotations')
compile 'com.squareup:kotlinpoet:0.4.0'
// compile 'com.squareup:kotlinpoet:0.4.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

????

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was commented out before I added Lens generation but I moved away from KotlinPoet in this PR so I commented it again. Should I go ahead and remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely :D What was the issue with Kotlinpoet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KotlinPoet wasn't handling generics and imports correctly. Handling that manually with Eugenio's lib was easy so I fully moved away from KotlinPoet.

@raulraja
Copy link
Member

jrm1m

Removed KotlinPoet dependency
@nomisRev nomisRev merged commit 9b47f64 into arrow-kt:master Sep 13, 2017
@wiyarmir wiyarmir mentioned this pull request Sep 15, 2017
rachelcarmena pushed a commit that referenced this pull request Feb 24, 2021
* Initial implementation

* Remove transaction from waiting list when it resumes

* Add a few useful stm datastructures

TMap and TSet need some work

* Use 64bit numbers for ids and just ignore rollover

* Smarter lock acquisition and start docs

* Fixes

* 🔥 unused imports

* Align api's of datatypes with our non-stm types

Also removed TMap and TSet for now

* Start testing datatypes

Also fixed some bugs

* More tests and small bug fixes

* Linter and test registerDelay

* Move exception handling to catch

try catch does not work because it keeps side-effects made in try

* 🔥 unused import

* Fix tests after exception handling refractor

* Much smarter lock strategy

* Fix some issues with blocking retry introduced by lock rework

* Use a mutable list for waiting transactions

Should save some time spent copying the list...

* Lock and release tvars right away when retrying

Before it locked everything first and unlocked them again later, blocking all variables till all of them had transactions registered

* Add two example cases to the tests

* Documentation and a few TODO's with optimization ideas

* More documentation

* Fix TSem.checkNonNegative

* Fix ank example

* Add an article about managing shared state in concurrent settings

The article presents the problem (race-conditions) and various solutions and their downsides/tradeoffs.

* Change locking strategy to retry if we encounter a lock

In 99% of the cases trying to validate a locked TVar means it is being updated and thus invalid.

* Use a different List implementation for queues

This does not pressure the gc as much because it is sharing. It is also very fast for head access

* Add TMap/TSet and move some stuff around

Also removed the need for blocking locking and changed how nested transactions run

* Linter

* Handle colliding hash values better

* Fix TMVar for nullable values.

TMVar(null) is not empty!

* Update arrow-docs/docs/fx/managing-state/README.md

Co-authored-by: Simon Vergauwen <[email protected]>

* Update arrow-docs/docs/fx/managing-state/README.md

Co-authored-by: Simon Vergauwen <[email protected]>

* Update arrow-docs/docs/fx/managing-state/README.md

Co-authored-by: Simon Vergauwen <[email protected]>

* Remove managing state for now.

Gonna redo that at some point

* Remove suspend encoding

It was unnecessary to begin with and this allows easier interleaving with effects

* 🔥 Unused imports

* Move STM to its own module

* Fix doc build

* Override fillInStackTrace for RetryException

* Address a few now inaccurate doc bits

* Some more outdated docs + slight doc changes

* Update STM.kt

Co-authored-by: Simon Vergauwen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants