Skip to content

Conversation

sdogruyol
Copy link

This updates Radix to new instance type implementation.

Note that i've updated Node, Result, Tree to Node(T), Result(T), Tree(T) to support generic payloads.

@sdogruyol
Copy link
Author

@luislavena meanwhile the specs are failing 😢

@luislavena
Copy link
Owner

Seems you based your change on a previous version. Please review your
changes against master.

Sorry for top posting, sent from mobile.
On Apr 13, 2016 05:02, "Serdar Dogruyol" notifications@github.com wrote:

@luislavena https://github.com/luislavena meanwhile the specs are
failing [image: 😢]


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

@sdogruyol
Copy link
Author

Okay, i'll review tonight 👍

@sdogruyol
Copy link
Author

@luislavena I just checked that and can confirm that this is up to date 👍

@luislavena
Copy link
Owner

Sorry but no, you're removing the work from master like SharedKeyError, the
types from instance variables and the fixes to 'Node#key' type.

Sorry for top posting, sent from mobile.
On Apr 13, 2016 14:21, "Serdar Dogruyol" notifications@github.com wrote:

I just checked that and can confirm that this is up to date [image: 👍]


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

@sdogruyol
Copy link
Author

Ah okay, i've just seen that my bad 😢

If you want i can remove this PR and wait for you to update Radix. WDYT?

@luislavena
Copy link
Owner

Bear with me, but I'm missing the point from your pull request (will be
great to provide details that explain them)

Is there something specific you're trying to fix or that radix doesn't work
as expected?

From what I skimmed on the diff, I couldn't tell what is what you want to
achieve.

Thank you.

Sorry for top posting, sent from mobile.
On Apr 13, 2016 14:46, "Serdar Dogruyol" notifications@github.com wrote:

Ah okay, i've just seen that my bad [image: 😢]

If you want i can remove this PR and wait for you to update Radix. WDYT?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

@sdogruyol
Copy link
Author

As you may already know i'm using Radix for Kemal and while updating Kemal to new Crystal version( which makes instance variable types a must) i've also needed to update Radix.

For example this won't work in the new Crystal version because the type is not known https://github.com/luislavena/radix/blob/master/src/radix/result.cr#L17.

This PR is the sum of all that instance type requirements.

Note: The link to related Crystal issue crystal-lang/crystal#2443

@luislavena
Copy link
Owner

I haven't check the new changes on Crystal, but definitely sounds like a
breaking change for Radix, thus bump of version.

In relation to payload, you cannot remove the possibility of it to be nil,
since that is used when building the tree.

That means that T also needs to consider | Nil

Right now in bed (sick) so will try to look at this maybe tomorrow or
Thursday.

Hope you understand.

Sorry for top posting, sent from mobile.
On Apr 13, 2016 14:55, "Serdar Dogruyol" notifications@github.com wrote:

As you may already know i'm using Radix for Kemal and while updating
Kemal to new Crystal version( which makes instance variable types a must)
i've also needed to update Radix.

For example this won't work in the new Crystal version because the type is
not known
https://github.com/luislavena/radix/blob/master/src/radix/result.cr#L17.

This PR is the sum of all that instance type requirements.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

@sdogruyol
Copy link
Author

@luislavena oh sorry to bother you. Hope you get well soon 🙏

Thank you!

@sdogruyol sdogruyol force-pushed the master branch 2 times, most recently from dd1f837 to 518ad50 Compare April 14, 2016 14:48
@sdogruyol
Copy link
Author

@luislavena i've update the specs but can't find a solution for initializing a Tree with a Node with no payload.

Here's the stacktrace.

Error in ./spec/radix/tree_spec.cr:28: instantiating 'Radix::Tree(TestPayload):Class#new()'

        tree = Tree(TestPayload).new
                                 ^~~

instantiating 'Radix::Tree(TestPayload)#initialize()'

in ./src/radix/tree.cr:29: instance variable '@root' of Radix::Tree(TestPayload) must be Radix::Node(TestPayload), not Radix::Node(Nil)

      @root = Node(T).new("", placeholder: true)

@sdogruyol
Copy link
Author

@luislavena now all specs are passing 🚀 👍

I think this is ready for me 😄

@luislavena
Copy link
Owner

Thank you @sdogruyol, I have fixes for this locally but need more testing against our internal codebase. Will update tomorrow.

Cheers.

@sdogruyol
Copy link
Author

@luislavena any update on this 😃

luislavena added a commit that referenced this pull request Apr 16, 2016
Introduce types for forward compiler compatibility

Closes #7
@luislavena
Copy link
Owner

@sdogruyol my coworkers and I decided to go with changes in #8, which included the optional payload and updates to the documentation.

Going to wrap this as 0.3.0 and tag it soon.

@luislavena
Copy link
Owner

@sdogruyol
Copy link
Author

Good job 👍

@luislavena
Copy link
Owner

Thank for your contribution and patience.

Have a nice weekend.

@sdogruyol
Copy link
Author

Thank you too 🎉

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.

2 participants