Abnaxos / markdown-doclet

A Doclet that allows the use of Markdown in JavaDoc comments.
GNU General Public License v3.0
319 stars 40 forks source link

Back port to 1.6 for intellij on osx #19

Closed astubbs closed 8 years ago

astubbs commented 11 years ago

https://github.com/Abnaxos/pegdown-doclet/issues/18

astubbs commented 11 years ago

Hmm, there mvn package throws an interesting error at the last stage with this change..

astubbs commented 11 years ago

Haven't finished looking into it yet:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (generate-javadocs) on project pegdown-doclet: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - warning: [options] bootstrap class path not set in conjunction with -source 1.6
[ERROR] /Users/antony/projects/pegdown-doclet/src/main/javadoc/overview.md: error - Body tag missing from HTML file
[ERROR] javadoc: error - Error writing highlight.js: highlight.pack.7.3.js (No such file or directory)
[ERROR] javadoc: error - Error writing highlight.js style 'default': highlight-styles/default.css (No such file or directory)
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/javadoc @options @packages
astubbs commented 11 years ago

Ok, not getting that NPE any more, can see the options box. However, trying to view the rendered comment anywhere I'm getting: Cannot fetch remote documentation: Could not initialize class ch.raffael.doclets.pegdown.SeeTagRenderer, without anything in the event log.

astubbs commented 11 years ago

Weird, it works fine though when I run the plugin inside idea.

astubbs commented 11 years ago

Ok, it looks like the issue was also related to a JRE 1.6 vs 1.7 difference, as when i run the plugin from within the ide, it launches an intellij session on my configured 1.7 JRE. However the installed version is running on 1.6. Apparently there were some changes to the regex compiler.

As in the commit message, the exception wasn't being reported, properly, so first changing the regex to compile in the constructor, instead of the class initialiser, showed the exception in the javadoc renderer window. Which I've listed in the comment. I broke the renderer, just to see if it would get working again. And looks like it does now. So I think changing that regex so it works with 1.6 might be the last thing to fix.

Ah, yes, actually recompiling against the 1.6 jdk (as opposed to using 1.7 to target 1.6) raises this compile error, also against the regex library:

/Users/antony/projects/pegdown-doclet/src/main/java/ch/raffael/doclets/pegdown/SeeTagRenderer.java
java: no suitable method found for group(java.lang.String)
    method java.util.regex.Matcher.group(int) is not applicable
      (actual argument java.lang.String cannot be converted to int by method invocation conversion)
    method java.util.regex.Matcher.group() is not applicable
      (actual and formal argument lists differ in length)
astubbs commented 11 years ago

Ok, I think I got it. Let me know what you think. Can re-jigger it to put the singleton pattern back in if you want. Not having the regex's compiled at the class loading stage though is useful.

astubbs commented 11 years ago

Once I get your input, I'd squash the later two regex commits into one as well. Left them separate for now to demonstrate my working.

Abnaxos commented 10 years ago

Sorry, I completely forgot about this issue / pull request.

Yes, I'm still maintaining it, however, I don't have a lot of time, currently. I'll to release this as 1.1.2 ASAP. Release 1.2 might still take some time, though.

astubbs commented 10 years ago

How can I get this merged?

astubbs commented 10 years ago

Emailed ya..

Abnaxos commented 9 years ago

Sorry, but I actually don't see any point in merging this anymore. IDEA 13 runs fine with JDK 7 also on Mac OS X, JDK 1.6 is end-of-life since February 2013. Also, this pull request contains at least one breaking change at PegdownDoclet.java, line 254, which makes me wonder, how the code was tested – it can't work like that (new File() is not the same as Class::getResource()).

I'll close that pull request without merging it, if noone disagrees.

astubbs commented 9 years ago

I still disagree. The plugin is unusable on OSX. I'm happy to fix the patch.

On 25/09/2014, at 10:50 am, Raffael Herzog notifications@github.com wrote:

Sorry, but I actually don't see any point in merging this anymore. IDEA 13 runs fine with JDK 7 also on Mac OS X, JDK 1.6 is end-of-life since February 2013. Also, this pull request contains at least one breaking change at PegdownDoclet.java, line 254, which makes me wonder, how the code was tested – it can't work like that (new File() is not the same as Class::getResource()).

I'll close that pull request without merging it, if noone disagrees.

— Reply to this email directly or view it on GitHub.

Abnaxos commented 9 years ago

You'll have to explain why it's unusable on OS X. Because the problems with OS X and IDEA are fixed starting with IDEA 13. Several people in my company use IDEA 13 on OS X with Java 7 without any issues.

So, what's your problem?

jbyler commented 8 years ago

Looks like we're finally getting close to IntelliJ on Mac OS X with non-Apple Java. As of 2015-10-01, here is the support page detailing the list of open issues, most of which are fixed now. Also, the IDEA 15 preview is available today, and it uses Java 8. The JetBrains team apparently gave up on waiting for Oracle to fix the various problems and is shipping with a patched JDK.