You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file in source/javascripts has a .js.coffee extension and contains "#= require site.js", middleman build succeeds with middleman-sprockets v4.1.0 but fails with v4.1.1. See reproduction script below.
Changing the extension from ".js.coffee" to ".coffee" fixes it. If this breaking change was intended, it should be noted in the README and 4.1.1 should have been versioned 5.0.0.
Expected behavior and actual behavior
Expected
== Sprockets will render css with SassC
create build/javascripts/other.js
create build/images/.keep
create build/javascripts/site.js
create build/index.html
Project built successfully.
Actual
== Sprockets will render css with SassC
~/sprockets-bug/source/javascripts/other.js.coffee:1: couldn't find file 'site.js' with type 'text/coffeescript' (Sprockets::FileNotFound)
Checked in these paths:
~/sprockets-bug/source/javascripts
~/sprockets-bug/source/stylesheets
~/sprockets-bug/source
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/resolve.rb:62:in `resolve!'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:409:in `resolve'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:216:in `process_require_directive'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:189:in `block in process_directives'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:187:in `each'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:187:in `process_directives'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:84:in `_call'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/directive_processor.rb:65:in `call'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:84:in `call_processor'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `reverse_each'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/processor_utils.rb:65:in `call_processors'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/loader.rb:182:in `load_from_unloaded'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/loader.rb:59:in `block in load'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/loader.rb:337:in `fetch_asset_from_dependency_cache'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/loader.rb:43:in `load'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/cached_environment.rb:44:in `load'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/base.rb:81:in `find_asset'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/environment.rb:31:in `find_asset'
from ~/.rvm/gems/ruby-3.0.2/gems/sprockets-4.0.2/lib/sprockets/base.rb:119:in `[]'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:37:in `block in sprockets_asset'
from ~/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4/lib/active_support/notifications.rb:205:in `instrument'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-core-4.4.0/lib/middleman-core/util.rb:21:in `instrument'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/resource.rb:36:in `sprockets_asset'
from ~/.rvm/gems/ruby-3.0.2/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
from ~/.rvm/gems/ruby-3.0.2/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
from ~/.rvm/gems/ruby-3.0.2/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/extension.rb:98:in `map'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/extension.rb:98:in `linked_resources'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/extension.rb:111:in `linked_resources!'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/extension.rb:61:in `block in manipulate_resource_list'
from ~/.rvm/gems/ruby-3.0.2/gems/activesupport-6.1.4/lib/active_support/notifications.rb:205:in `instrument'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-core-4.4.0/lib/middleman-core/util.rb:21:in `instrument'
from ~/.rvm/gems/ruby-3.0.2/gems/middleman-sprockets-4.1.1/lib/middleman-sprockets/extension.rb:60:in `manipulate_resource_list'
Steps to reproduce the problem (from a clean middleman installation) or example repo
When a file in source/javascripts has a .js.coffee extension and contains "#= require site.js",
middleman build
succeeds with middleman-sprockets v4.1.0 but fails with v4.1.1. See reproduction script below.Changing the extension from ".js.coffee" to ".coffee" fixes it. If this breaking change was intended, it should be noted in the README and 4.1.1 should have been versioned 5.0.0.
Expected behavior and actual behavior
Expected
Actual
Steps to reproduce the problem (from a clean middleman installation) or example repo
Additional information
The text was updated successfully, but these errors were encountered: