-
Notifications
You must be signed in to change notification settings - Fork 18
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
Compile Error #28
Comments
There are indeed a lot of warnings when compiling it's dependencies and itself (especially those URL-linked warnings, yeesh ton of those!), but I didn't get an error in compiling itself. My versions:
/me wonders what this library would look like and how much faster it would be if implemented via my ProtocolEx libraries without structs (proper pattern matching)... |
all elements in my environment have a higher version than @OvermindDL1 's, I suggest that it is the reason? |
I know the brand-new OTP 21.0 is broken on Windows right now (the just released patch for it fixed it I think though?) but you said you tested 19 as well (assuming 2.1 meant 21 and 1.9 meant 19)? Do you have a fully reproduceable project that you can upload that examples the issue? |
@OvermindDL1 In fact, for fare that it is a problem caused by other objects in my project, I reopenned a new one which has the only dep of algae, and it also fails. |
Have you updated to the new OTP 21.1 patch yet? Where is a git repo of the example? |
Sorry for not being able to reply at once. I am now updating my |
Just now, I even compiled |
I can replicate it! Woo!
|
rewrite dependence version
I resolved compile by using this method |
Oh did you lock in an old version? I didn't even check that... >.> |
Sorry for the delay! I only got an email about this thread now 😖 Weird TL;DR I know where the issue was introduced (in @OvermindDL1 & @SchrodingerZhu
Yeah, those are override warnings from TypeClass, and are totally normal. We skip compile-time prop checks on some instances, and it intentionally prints that message warning you that the instance has fewer guarantees about lawfulness. I agree that it's a lot of text, but I'm not sure if this is better or worse than potentially having unprincipled behaviour. I've been considering breaking it out into test helpers instead, which would also speed up the first compilation, but having compile-time checks is a nicety.
This is normal the first time you compile Algae. We're doing a bunch of compile-time property checking (via
Hmm, I was initially getting this exact error when reviewing this PR, but thought that it was fixed 🤔 I'll do some digging, but may just revert that change in |
I've been thinking about how to handle these similar tests in my ProtocolEx library as well, right now they are always enforced on and ran at compile-time in all modes, but I want to make it configurable, but I cannot really come up with a way that I really like, I might just defer it to a tag-style system environment enable/disable thing... >.> |
Thinking out loud here, but a potential solution is to add a flag inside the module for when you're happy with an instance, and include a hash of the AST. Now if a single character changes, essentially your cache gets invalidated, and you're forced to retest at compile time 🤔 It might be overkill, I'm not totally sure yet. |
In my ProtocolEx system (an Elixir Protocol-like library that works on matchers instead of structs and such, significantly more powerful with many chances for optimizations so it generates faster code than Elixir's Protocol's) it supports being able to define property tests (any idea where I got that idea from eh? ;-) ) to ensure the implementations fulfill the requirements of the interface. I could indeed hash the implementation timestamps and only re-run that when wanted, but it is also designed to be done with actual property testing frameworks like proper or StreamData(sp?) or so, thus it can test different randomized conditions each time, so I'm not sure when it is a good time to stop it. So many variables! o.O! |
Will be merged shortly and pushed to Hex as |
@SchrodingerZhu I'm going to close this issue. Running |
Thanks for your work! |
I got a compile error on Windows.
First, there is a long stuck when building
witchcraft
.And then, there is an error.
I have tested on
erlang 2.1
anderlang 1.9
, and theelixir
version is1.6.5
and1.6.6
.The text was updated successfully, but these errors were encountered: