-
Notifications
You must be signed in to change notification settings - Fork 237
Conversation
Presumably 0d0550c is for lens crash, right? Could we perhaps make the It is very good to see you adding tests. GHC is a moving target and without tests it's pretty much impossible to tell how/when something breaks. What's the situation with unicode? I know it was a TODO and I haven't seen changes. Even if the linking doesn't work optimally, we need to operate as usual. What does HsColour behave like? Notably, I don't want a regression in functionality. If HsColour is able to highlight unicode stuff properly but we aren't then that'd be a regression IMHO. I wonder if you thought about how we could go through migration from HsColour. I would not like to exclude the possibility to use it. We can't update old cabal versions so we should probably make sure that if they call Haddock how they used to, stuff still works (even if our own highlighter is used). I think I will create an issue over at cabal and see how they want to go about it and what needs they have: maybe some stuff on Hackage needs to be flipped too. If we ship with some grave bug that we don't catch but it becomes unusable for people then the option to use HsColour as usual needs to be there, at least for a release or two. After it has been battle-tested a bit, we could potentially remove any extra stuff we don't need for it (is there any?). It would be good for you to prepare some kind of release notes for this feature. What it does and how to use. If you prefer, you can write a sort of a blog post and publish it somewhere once we merge and I can link to that when announcing new release (though of course you're free to publish early with subject-to-change disclaimer). Eventually we'll also need some words in the documentation, notably updating the flag descriptions and adding any new ones. For early adopters, we should tell them what flags to use before cabal makes it default (if it has to do any work at all). Luckily there is nowadays a
If it's a bug in GHC then we need to check if it's know or not and report it if necessary. @alanz is this stuff in your domain of reign? Are there any bugs you know of or major features that are missing still? If there's something seriously broken then we need to fix it ahead of time and if not possible, ticket it. If there are non-critical issues missing then we need to open tickets. Assuming this PR works as advertised, I can't think off the top of my head of anything major except cross-package links which are out of scope for this right now or anything I haven't already mentioned/asked about. I don't want to have Edward K on my case because Haddock is crashing or otherwise misbehaving on one of his libraries again. Lastly, do you think what's here is OK for merging and use? Basically, do you have confidence in that it will work? I can only test so much myself before running out of time: if you can add tests for more cases then do! Stuff like the I would like to merge within few days, maybe Saturday/Sunday if you give a heads up. |
Yep.
Done the explicit pattern version. The problem is that constructors in the AST are sometimes quite intimidating, like with the
HsColour doesn't recognize unicode either. And lack of it isn't that terrible, just some operators like
As long as you don't use
I updated the documentation file (I hope I did it right as I have never done anything in DocBook before). Essentially, there are only two new flags and that's it. I have also added some information about (previously undocumented) source path option in
I checked it on The only issues I know about:
I will create appropriate issues for them. That being said, this is Haskell and tons of weird extensions I have never heard about. While it shouldn't crash no matter what (but obviously I can't guarantee that), it may produce wrong hyperlinks or syntax highlighting from time to time. But everything that HsColour does right now, my hyperlinker should be capable of as well. |
Can you elaborate? We don't have cross-package hyperlinking do we?
I find that not many people tend to do this. It's easier for us to make it the default and then advise to report issues and use HsColour if there's a problem.
Good enough. Logic bugs we can fix later, crashes are immediate problems.
Good! |
Oh yeah, and
Alternatively you could have done something like
or
|
We do if there is interface file available. For example, assume our package depends on
And then you can do something like:
... except I just did it and something seems to be broken.
Thanks, I wasn't aware you can do partial record unpacking. |
Mystery solved: Generally, these cross-package hyperlinking issues should happen only for things that are somewhat duplicated which is quite uncommon for things outside There are also some good news: when searching for the source of a problem, I did a bit of refactoring and that gave me an idea how to solve problem with imports hyperlinking. |
Awesome. |
I have investigated how Haddock is able to hyperlink
And once you have interface file and hyperlinked source for I have finally fixed issue with hyperlinking modules in import statements. I suspect AST does not have Anyway, I think we are ready for a merge. Or maybe there are some new thoughts? |
I'll try to merge today. |
Please open issues/feature requests discussed throughout this PR and any other you can think of. We will no doubt mess with the code from this PR here and there in the future but you should now focus on the second part of your GSOC proposal. |
First part of my Google Summer of Code project. I am sure that there are many, many issues I am not aware of, so treat is as a beta for now. The real testing will begin once Cabal incorporates this to its pipeline.