Closed
Conversation
Same approach as Shopify#1467 for sassc-rails: compiled all CoffeeScript files to plain JavaScript using the CoffeeScript 1.12.7 compiler (matching coffee-rails 5.0), then removed the coffee-rails dependency entirely. This is needed because coffee-rails depends on coffee-script which depends on execjs, causing issues in ruby-bench (ruby/ruby-bench#493). - Compiled 18 .coffee files to .js using `coffee -bc` (bare compile) - Preserved sprockets directives (require, require_tree, require_self) - Preserved ERB in task/notifications.js.erb for image_path helpers - Removed coffee-rails from gemspec and lib/shipit.rb - No changes needed to HTML templates or asset precompile configuration
The ansi_stream gem ships ansi_stream.coffee in its vendor assets. Sprockets 3.x has a built-in CoffeeScript processor that tries to require 'coffee_script' when encountering .coffee files. Without coffee-rails, this causes LoadError during asset precompilation. Vendor a pre-compiled JS version of ansi_stream so it takes precedence over the gem's .coffee file in the sprockets asset paths.
The ansi_stream gem is Copyright (c) 2014 Guillaume Malette, MIT licensed. Include the full license text as required by the MIT license terms.
Member
Author
This PR does this. WDYT? @Edouard-chin @etiennebarrie @rafaelfranca cc: @byroot |
Contributor
If it's necessary, we can do it, but I think as others mentioned, ruby-bench can just not compile assets.
|
Member
Author
|
Thanks for your feedback. I guess ruby/ruby-bench#495 obviates this, so I'm gonna close this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same approach as #1467 for sassc-rails: compiled all CoffeeScript files to plain JavaScript using the CoffeeScript 1.12.7 compiler (matching coffee-rails 5.0), then removed the coffee-rails dependency entirely.
This is needed because coffee-rails depends on coffee-script which depends on execjs, causing issues in ruby-bench
(ruby/ruby-bench#493).
coffee -bc(bare compile)