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

undefined method `type' for .focus:Sass::Selector::Class (NoMethodError) #1656

Closed
cvrebert opened this issue Feb 25, 2015 · 0 comments
Closed

Comments

@cvrebert
Copy link

A couple of bootstrap-sass's users appear to have found a crash bug in Sass, albeit with SCSS whose validity I am uncertain of.

Environment: Sass 3.4.12 (Selective Steve)

SCSS:

.btn {
  &:active {
    &.focus {
      background-color: red;
    }
  }
}

.extender {
  &:before {
    @extend .btn;
  }
}

Crash:

$ sass --trace thisexample.scss 
/usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `block in unify': undefined method `type' for .focus:Sass::Selector::Class (NoMethodError)
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `each_with_index'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `find'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple.rb:77:in `unify'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/pseudo.rb:137:in `unify'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:240:in `block in unify'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:238:in `each'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:238:in `inject'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:238:in `unify'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:195:in `block in do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:188:in `map!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/simple_sequence.rb:188:in `do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/sequence.rb:112:in `block in do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/sequence.rb:110:in `map'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/sequence.rb:110:in `do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/comma_sequence.rb:71:in `block in do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/comma_sequence.rb:70:in `map'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/selector/comma_sequence.rb:70:in `do_extend'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/extend.rb:44:in `visit_rule'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/extend.rb:28:in `visit'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/base.rb:52:in `map'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/base.rb:52:in `visit_children'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/extend.rb:37:in `visit_children'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/base.rb:38:in `visit'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/extend.rb:28:in `visit'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/visitors/extend.rb:15:in `visit'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/root_node.rb:39:in `css_tree'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/tree/root_node.rb:20:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/engine.rb:268:in `render'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/exec/sass_scss.rb:415:in `run'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/exec/sass_scss.rb:63:in `process_result'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/exec/base.rb:52:in `parse'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/lib/sass/exec/base.rb:19:in `parse!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/sass-3.4.12/bin/sass:13:in `<top (required)>'
    from /usr/local/bin/sass:23:in `load'
    from /usr/local/bin/sass:23:in `<main>'

Refs twbs/bootstrap-sass#769

@nex3 nex3 closed this as completed in 787b6ef Feb 27, 2015
kerchner added a commit to gwu-libraries/scholarspace that referenced this issue Jun 22, 2015
markbreedlove pushed a commit to dpla-attic/heidrun that referenced this issue Jun 23, 2015
We were getting an error from `rake assets:precompile` during
deployments, as follows:

    undefined method `type' for .focus:Sass::Selector::Class
    (NoMethodError)

This appears to be related to
sass/sass#1656

The quick fix for `heidrun` is to bump sass-rails up to version
5.x.
anarchivist pushed a commit to dpla-attic/KriKri that referenced this issue Jun 24, 2015
Krikri currently is pinned to the Rails 4.1 release series, which depends
on sass-rails ~> 4.0.3. Recently, we ran into an issue which seemed to be a
manifestation of sass/sass#1656 despite the seeming
version differences.

The changes that this makes are as follows:

* Explicitly add sass-rails ~> 5.0.0 to the Krikri gemspec. Without this, we
run into a dependency conflict with tilt (sass-rails requires a different version
than haml does, which is required by rdf-rdfa through the linkeddata gem).
* Pass `--skip-sprockets` to the engine_cart handler that generates the new
application. If this is not included, you get some annoying messages about
dependency conflicts that shouldn't be show stoppers.
* Add the necessary sass-rails and uglifier gems, and manually re-enable
the sprockets railtie.
anarchivist pushed a commit to dpla-attic/KriKri that referenced this issue Jun 24, 2015
Krikri currently is pinned to the Rails 4.1 release series, which depends
on sass-rails ~> 4.0.3. Recently, we ran into an issue which seemed to be a
manifestation of sass/sass#1656 despite the seeming
version differences.

The changes that this makes are as follows:

* Explicitly add sass-rails ~> 5.0.0 to the Krikri gemspec. Without this, we
run into a dependency conflict with tilt (sass-rails requires a different version
than haml does, which is required by rdf-rdfa through the linkeddata gem).
* Pass `--skip-sprockets` to the engine_cart handler that generates the new
application. If this is not included, you get some annoying messages about
dependency conflicts that shouldn't be show stoppers.
* Add the necessary sass-rails and uglifier gems, and manually re-enable
the sprockets railtie.
anarchivist pushed a commit to dpla-attic/KriKri that referenced this issue Jun 24, 2015
This relates to sass/sass#1656. bootstrap-sass 3.3.5 introduced a
regression which causes the Blacklight default CSS to fail its build.
A quick fix could be to require sass-rails 5.0.x, but that introduces
some slight dependency resolution problems under Rails 4.1 since
Rails 4.1 apps use sass-rails ~> 4.0.3 by default. The better fix
will be to upgrade Krikri to Rails 4.2, but that will require further
testing. This change has to be in the gemspec, and not the Gemfile for
Krikri or the application in which it is hosted, as the dependencies
won't resolve properly otherwise.
ndushay added a commit to sul-dlss/SearchWorks that referenced this issue Jul 14, 2015
ebenenglish added a commit to boston-library/blacklight-maps that referenced this issue Jul 15, 2015
ebenenglish added a commit to boston-library/blacklight-maps that referenced this issue Jul 15, 2015
jcoyne added a commit to samvera/hydra-editor that referenced this issue Sep 17, 2015
This relates to sass/sass#1656. bootstrap-sass 3.3.5 introduced a
regression which causes the Blacklight default CSS to fail its build.
jcoyne added a commit to projectblacklight/blacklight_folders that referenced this issue Nov 4, 2015
cjcolvar added a commit to projectblacklight/blacklight_folders that referenced this issue Nov 5, 2015
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

1 participant