- 
                Notifications
    
You must be signed in to change notification settings  - Fork 17
 
Remove use of Vector #50
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
Conversation
Signed-off-by: Sacha-Élie Ayoun <[email protected]>
| 
           (That being said, going to OCaml 5 would give a good occasion to address #46 and to give an effect-handler interface to Progress, it's a perfect use case, instead of having to carry around the progress function)  | 
    
| 
           In my opinion, forcing progress to require only OCaml 5.2 is too restrictive for people who use progress and want this library to remain available for 4.14 (at least). 
 Another solution could be to rename the Vector module to progress - this module is not intended to be exported.  | 
    
| 
           I think the issue stems from the existence of Vector in my opam switch as a dependency of something I import, I don't think it's exported by Progress at all. But yeah, I agree that it's a bit restrictive.  | 
    
Signed-off-by: Sacha Ayoun <[email protected]>
Signed-off-by: Sacha Ayoun <[email protected]>
| 
           Unfortunately it seems that the library causing my issue is unresponsive. And I can't do without it for now... I guess, in general, it is good to reduce the number of dependencies of progress anyway where possible. How about this: if Vector is installed, it is used, and if not, we use Dynarray. The only downside is that dune-project syntax does not support dependencies conditional on another package -- funnily enough, @craigfe figured that out, and it seems that it hasn't been updated since. So I've disabled opam file generation from dune for now.  | 
    
Signed-off-by: Sacha Ayoun <[email protected]>
| 
           There may indeed be a solution where, depending on the libraries installed, we could find a way to avoid a name clash. The problem is that this issue is quite well known in the OCaml community, which normally makes an effort to avoid it. I remember the problem between base64 and  
 I would need to look in detail at a possible solution that would satisfy you (and perhaps take   | 
    
| 
           Sorry I was unclear: I have implemented such a solution in this PR, it passes CI and indeed does not require Vector for OCaml >= 5.2.0 That being said, there is no emergency for me to merge if you can't work on this before next month. I have pinned my fork for now. It's just that keeping pin-depends all over is technical debt I'd like to avoid, which is why I'm trying to upstream the work :)  | 
    
Signed-off-by: Sacha Ayoun <[email protected]>
Signed-off-by: Sacha Ayoun <[email protected]>
…tor in only one case Signed-off-by: Sacha Ayoun <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apart from these two additions, lgtm
| 
           Looks like it passes CI :) Thank you for your help @kit-ty-kate  | 
    
| 
           Seems indeed good, we must document that at some point for maintainers but I'm good with the idea.  | 
    
| 
           There is already comments in the dune file with the rules explaining the reasons and pointing to this PR Happy to add comments in other places as well, where do you think it would help?  | 
    
          
 Ah yes, I missed it. So I will not be able to make a proper review and release this week. But I will try to cut one next week 👍. Thanks for your work and thanks @kit-ty-kate for your help.  | 
    
          
 No emergency still :) Thank you!  | 
    
Signed-off-by: Sacha Ayoun <[email protected]>
| 
           Ok I look into details in this PR and everything seems good for my point of view. I will merge it and cut a release to help you. I think it introduce however a breaking change that we should explain into the changelog.  | 
    
| 
           Close by #52  | 
    
Using Vector is not required anymore since Dynarray was added to Stdlib in OCaml 5.2.0
That being said, I understand that this means Progress is only compatible with 5.2 and beyond, so I'm not convinced it's a good idea to merge this.
I made it because lem exposes a Vector module and that clashes with the Vector library... And modifying lem is a much harder task than modifying Progress. I did ask the maintainers of lem to hide the export to avoid that issue, but in the meantime I have my fork of Progress.
Still, I thought I'd open the PR and let you make that decision :)