This is a high severity bug that luckily seems not to impact most projects. Unfortunately, it is making it so Lucky will not work on 0.26 though. I'm giving a workshop on Crystal and Lucky tomorrow so I would love to fix this before then so everyone can build something š but I know we're all volunteers so if the core team doesn't have time that is ok! I'll figure something out.
On Crystal 0.26, compiling lucky_record fails with this error:
Error in /Users/paulcsmith/projects/crystal-lang/crystal/src/string.cr:139: can't declare variable with Self
include Comparable(self)
Note: This is the whole trace, even with --verbose
. I'm not sure what in LuckyRecord/Crystal is causing this.
shards install
crystal spec
It seems that the error is in Crystal, but that particular line of code it is referencing (src/string.cr:139) hasn't changed in years.
I'm having a hard time even figuring out what is wrong since it fails so fast and there is no trace. I tried using --verbose
and still didn't see anything. I'm not sure how to debug this
BTW @bcardiff and other manas people, I know you have client obligations and have a lot on your plate. Iām happy to make an additional donation to prioritize this. I think thatās the fair thing to do for something that Iād love some help with ;)
LMK if thatāll help give someone time to look at this soon and Iāll make a quick donation on BountySource!
I will work on this asap today.
Thanks for your perspective regarding efforts in Crystal.
What happens if you change that include to include Comparable(String)
? (you'll have to change the src
directory from the crystal installation, or simply use a different CRYSTAL_PATH to try it out). If that works, that can be a workaround until someone figures out what broke.
As a side note, I think having self
as a type restriction, or as a type at all (here in include
) was a mistake. I'll explain later why.
Thanks @bcardiff! I made a donation on BountySource
On Aug 16, 2018, at 8:15 AM, Brian J. Cardiff notifications@github.com wrote:
I will work on this asap today.
Thanks for your perspective regarding efforts in Crystal.ā
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I know anything here was done with good intentions, we just might want to avoid sending a message that tasks are prioritized by amount of donations to the project.
@paulcsmith You could just have posted a bounty in https://www.bountysource.com/issues/62220002-crystal-src-string-cr-139-can-t-declare-variable-with-self , and reference the link on the issue.
I understand what you mean. I think this is tricky partly because of my wording.
I think this issue should be prioritized anyway because:
Iāve donated over a thousand dollars to Crystal and not asked for any special priotization because I donāt think that is fair.
In this case I asked for it because Iām doing a workshop tomorrow and right now that canāt happen :(
I offered money not so much as a donation, but as a client of Manas to ask them to do this work in place of normal client work. I think this is 100% ok. I phrased it as a ādonationā but that was my mistake. It was just the easiest way I knew to get it done quickly.
I could have posted on BountySource for this specific issues but since this is so time sensitive I wanted to make sure it could be done quickly.
I hope this clarifies things and Iām sorry for any trouble it has caused.
On Aug 16, 2018, at 9:18 AM, Julien Reichardt notifications@github.com wrote:
@paulcsmith You could just have posted a bounty in https://www.bountysource.com/issues/62220002-crystal-src-string-cr-139-can-t-declare-variable-with-self , and reference the link on the issue.
ā
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@paulcsmith I didn't expect extra donation. You are already supporting us.
This issue is important because is blocking lucky, probably due to a inconsistency in the stdlib or bug.
IMHO it would be better to frame it as a bounty (with money reward).
Yes that would have been better wording. And I like supporting crystal so even if the extra bounty was not necessary, Iām happy to support Crystal development :)
@paulcsmith As I said, I know you didn't mean it :) and I think lucky is very high in the priority tree.
This is also in part why I knew @bcardiff was so eager to help, I was just pointing that this could be a risky message.
Paying manas is 100% fine, not only fine but important :) so again, was just worried about the situation, not the "details"
@asterite changing to include Comparable(String)
make the test suite pass...
how to use the fix ? first time try cr then get this bug. i check again and think some of my step get wrong.
@patrickkh7788 the easiest thing to do is wait for crystal 0.26.1 to come out in a new days
Woo hoo! Thanks Crystal team
Most helpful comment
I know anything here was done with good intentions, we just might want to avoid sending a message that tasks are prioritized by amount of donations to the project.