Skip to content
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

Broken symlink in gem (find_error.py) #176

Closed
mojavelinux opened this issue Feb 9, 2017 · 8 comments
Closed

Broken symlink in gem (find_error.py) #176

mojavelinux opened this issue Feb 9, 2017 · 8 comments

Comments

@mojavelinux
Copy link
Contributor

For some reason, when the gem is packaged and subsequently installed, the symlink from find_error.py to debug_lexer.py in vendor/pygments-main/scripts. Perhaps we can either delete this symlink or reify it during packaging.

mojavelinux added a commit to mojavelinux/pygments.rb that referenced this issue Feb 9, 2017
@mojavelinux
Copy link
Contributor Author

I guess RubyGems recently started supporting symlinks when packaging, which is why this all of a sudden became a problem.

@mojavelinux
Copy link
Contributor Author

Note that this is a showstopper for many environments in which the gem is used.

@fapdash
Copy link

fapdash commented Mar 21, 2017

We @vogellacompany would really like to adapt pygments.rb for our tutorials but this issue breaks compatibility with JRuby, on which we depend.
Can you please consider accepting the PR and releasing a new minor version?

@gfx gfx closed this as completed in 986a1a9 Apr 3, 2017
gfx added a commit that referenced this issue Apr 3, 2017
resolves #176 exclude find_error.py symlink from gem
@fapdash
Copy link

fapdash commented Apr 8, 2017

@mojavelinux Somehow this doesn't fix the issue for me, please reopen.

* Exception is:
org.gradle.api.GradleException: Could not list contents of '/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/gems/gems/pygments.rb-1.1.2/vendor/pygments-main/scripts/find_error.py'. Couldn't follow symbolic link.

@mojavelinux
Copy link
Contributor Author

mojavelinux commented Apr 9, 2017

Sorry, but whoever released the gem didn't do it correctly. The exclusion in the gemspec didn't execute properly and is absent from the distributed package (thus including the symlinks). If you build the gem yourself and install it, you'll find that it works.

@mojavelinux
Copy link
Contributor Author

Actually, the gemspec in the released package is correct. So wherever the release task was run from isn't compatible with the exclusion commands (either git or find). My guess is find. I tested on a Linux box.

@mojavelinux
Copy link
Contributor Author

Another extremely simple way to fix this problem is to have the Rake tasks that pulls down the pygments repo delete the symlink. It already deletes other files. See https://github.com/tmm1/pygments.rb/blob/dfa203797fa293822966a7479162de203127dca6/Rakefile#L46-L51.

@fapdash
Copy link

fapdash commented Apr 9, 2017

@mojavelinux Thank you! I've build the gem locally and can confirm that it works but I'm still having problems when running it with JRuby. I can confirm that those exact gem versions (asciidoctor and pygments.rb) run fine on MRI/CRuby.
Posting here since I don't really know which part of the tool chain is the problem:

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':JavaDateTimeAPI:createHtml'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.api.GradleException: Error running Asciidoctor
        at org.asciidoctor.gradle.AsciidoctorTask.processDocumentsAndResources(AsciidoctorTask.groovy:663)
        at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:596)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 68 more
Caused by: org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `activate' for nil:NilClass
        at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:338)
        at org.asciidoctor.Asciidoctor$renderFile.call(Unknown Source)
        at org.asciidoctor.gradle.AsciidoctorProxyImpl.renderFile(AsciidoctorProxyImpl.groovy:26)
        at org.asciidoctor.gradle.AsciidoctorProxy$renderFile.call(Unknown Source)
        at org.asciidoctor.gradle.AsciidoctorTask.processSingleFile(AsciidoctorTask.groovy:676)
        at org.asciidoctor.gradle.AsciidoctorTask$_processDocumentsAndResources_closure7.doCall(AsciidoctorTask.groovy:656)
        at org.asciidoctor.gradle.AsciidoctorTask.processDocumentsAndResources(AsciidoctorTask.groovy:651)
        ... 77 more
Caused by: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `activate' for nil:NilClass
        at RUBY.try_activate(/home/fap/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.26/c09885af02af34266ed929f94cedcf87cc965f46/jruby-complete-1.7.26.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:198)
        at RUBY.require(/home/fap/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.26/c09885af02af34266ed929f94cedcf87cc965f46/jruby-complete-1.7.26.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:126)
        at RUBY.require_library(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/helpers.rb:24)
        at RUBY.highlight_source(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/substitutors.rb:1371)
        at RUBY.apply_subs(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/substitutors.rb:117)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
        at RUBY.apply_subs(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/substitutors.rb:104)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/block.rb:118)
        at RUBY.listing(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/html5.rb:611)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/base.rb:34)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:71)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:80)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2414)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:80)
        at RUBY.section(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/html5.rb:350)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/base.rb:34)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:71)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:80)
        at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2414)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/abstract_block.rb:80)
        at RUBY.content(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/document.rb:1112)
        at RUBY.document(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/html5.rb:179)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/converter/base.rb:34)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor/document.rb:1052)
        at RUBY.convert(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor.rb:1522)
        at RUBY.convert_file(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor.rb:1593)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1201)
        at RUBY.convert_file(/home/fap/repos/com.vogella.tutorials.java/JavaDateTimeAPI/build/jruby_prepare/gems/asciidoctor-1.5.6.dev.2/lib/asciidoctor.rb:1593)
        at RUBY.convertFile(<script>:68)
        at org.jruby.gen.InterfaceImpl859160450.convertFile(org/jruby/gen/InterfaceImpl859160450.gen:13)
        at org.asciidoctor.gradle.AsciidoctorProxyImpl.renderFile(AsciidoctorProxyImpl.groovy:26)
        at org.asciidoctor.gradle.AsciidoctorTask.processSingleFile(AsciidoctorTask.groovy:676)
        at org.asciidoctor.gradle.AsciidoctorTask$_processDocumentsAndResources_closure7.doCall(AsciidoctorTask.groovy:656)
        at org.asciidoctor.gradle.AsciidoctorTask.processDocumentsAndResources(AsciidoctorTask.groovy:651)
        at org.asciidoctor.gradle.AsciidoctorTask.processAsciidocSources(AsciidoctorTask.groovy:596)


BUILD FAILED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants