Closed jmarrec closed 7 months ago
openstudio -e "puts EmbeddedScripting::getFileAsString(':/ruby/2.7.0/specifications/racc-1.7.2.gemspec')"
# -*- encoding: utf-8 -*-
# stub: racc 1.7.2 ruby lib
# stub: ext/racc/cparse/extconf.rb
Gem::Specification.new do |s|
s.name = "racc".freeze
s.version = "1.7.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Minero Aoki".freeze, "Aaron Patterson".freeze]
s.date = "2023-11-01"
s.description = "Racc is a LALR(1) parser generator.\n It is written in Ruby itself, and generates Ruby program.\n\n NOTE: Ruby 1.8.x comes with Racc runtime module. You\n can run your parsers generated by racc 1.4.x out of the\n box.\n".freeze
s.email = [nil, "aaron@tenderlovemaking.com".freeze]
s.executables = ["racc".freeze]
s.extensions = ["ext/racc/cparse/extconf.rb".freeze]
s.extra_rdoc_files = ["README.ja.rdoc".freeze, "README.rdoc".freeze]
s.files = ["README.ja.rdoc".freeze, "README.rdoc".freeze, "bin/racc".freeze, "ext/racc/cparse/extconf.rb".freeze]
s.homepage = "https://github.com/ruby/racc".freeze
s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 2.5".freeze)
s.rubygems_version = "3.1.4".freeze
s.summary = "Racc is a LALR(1) parser generator".freeze
s.installed_by_version = "3.1.4" if s.respond_to? :installed_by_version
end
openstudio -e "puts Gem::Specification.map{|spec| [spec.name, spec.version].join('-')}"
openstudio -e "p Gem::Specification.select{|spec| spec.name == 'racc'}"
WOrks on docker nrel/openstudio:3.7.0 (which is an ubuntu 20.04) and fails on my machine... env -i
clears the entire environment variables.
env -i /usr/local/openstudio-3.7.0/bin/openstudio classic --verbose --bundle Gemfile --bundle_path ./.bundle --bundle_without native_ext -e "puts ENV.to_h"
Seems like pinning parser to 3.2.2.2 is enough to Not have racc as a runtime dependency:
https://github.com/whitequark/parser/commit/37146d8247b02dfcd9c94163384b1069d8e0a3a6
THis is done on develop for OpenStudio-measure-tester-gem but I don't think there are any released version with it.
and https://github.com/NREL/OpenStudio-measure-tester-gem/issues/66
Still going to have issues since some of the OS gems depend on stuff like rubyXL or Nokogiri which in turn depend on racc.
We'll need to figure out what's the problem with racc.
With ruby3 gems update, racc is not longer a dependency we have (measue-tester-gem pinned parser to a version before it was introduced)
Issue overview
We have gems that indirectly depend on racc. I can't seem to run with a bundle / Gemfile that has racc as a dependency on either of my machines, but it works on nrel/openstudio:3.7.0 docker, why?
rubocop 1.15.0 (and nokogiri and rubyXL) depend on racc.
example
https://github.com/NREL/OpenStudio-measure-tester-gem/blob/14659ef904019789f651a890bc56d2324d725805/openstudio_measure_tester.gemspec#L37
Current Behavior
Expected Behavior
Steps to Reproduce
On my M1 mac and on my Ubuntu 20.04 it fails regardless of whether I try racc 1.7.2 (like the embedded one) or 1.7.3. I use an RVM provided ruby on both, but I've tried manually unsetting GEM_HOME / GEM_PATH (even though the embedded ruby does that already)
On docker,
docker run -it --rm --platform linux/amd64 nrel/openstudio:3.7.0
it works with 1.7.2 and with 1.7..3Possible Solution
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context