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

Opal support outdated #359

Closed
joep opened this issue Dec 12, 2020 · 2 comments · Fixed by #374
Closed

Opal support outdated #359

joep opened this issue Dec 12, 2020 · 2 comments · Fixed by #374

Comments

@joep
Copy link

joep commented Dec 12, 2020

Opal seems to have restructured their code and there no longer seems to be any tilt support baked in. Opal::Processor went away at some point.

That is, the following:

require 'opal'
require 'tilt'

Tilt.new 'a.rb'

results in:

/Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:246:in `eval': uninitialized constant Opal::Processor (NameError)
Did you mean?  Process
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:246:in `eval'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:246:in `block in lazy_load'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:241:in `each'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:241:in `lazy_load'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:216:in `lookup'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:154:in `[]'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt/mapping.rb:137:in `new'
        from /Users/joe/.rvm/gems/ruby-2.4.0/gems/tilt-2.0.10/lib/tilt.rb:43:in `new'
@jeremyevans
Copy link
Contributor

Agreed, we should probably remove the register_lazy for Opal::Processor.

judofyr pushed a commit that referenced this issue Aug 4, 2022
Remove support for external opal, since opal changed the API.

Fixes #323
Fixes #359
@hmdne
Copy link

hmdne commented Jan 5, 2023

We have Tilt support, but Opal::Processor is part of opal-sprockets gem. In core, we have a class that doesn't require Sprockets, namely Opal::TiltTemplate: https://github.com/opal/opal/blob/master/lib/tilt/opal.rb

Anyway, I think it's best to leave that choice to a developer.

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

Successfully merging a pull request may close this issue.

3 participants