Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix syntax error in importmap-rails 2.0.2 (unexpected ')') #268

Closed
wants to merge 1 commit into from

Conversation

tipsyhipsy
Copy link

Description

This pull request fixes a syntax error in importmap-rails version 2.0.2 that caused the following error during application boot:

/usr/local/bundle/gems/importmap-rails-2.0.2/lib/importmap/map.rb:45: syntax error, unexpected ')'
...s_and_directories(entry_point:), resolver:).values
...                              ^

The issue was related to incorrect usage of parentheses in the map.rb file, which was preventing the application from starting properly. The parentheses have been corrected to resolve this error.

Changes

Corrected syntax in importmap/map.rb to fix the parentheses error.
Why this change is necessary: This bug prevented the application from starting, impacting users who rely on importmap-rails version 2.0.2. This fix ensures the application can boot without syntax errors.

@tagliala
Copy link

tagliala commented Oct 9, 2024

This is going to be addressed by d79dfbf, the shorthand syntax is available on Ruby >= 3.1.

https://rubygems.org/gems/importmap-rails/versions/2.0.2 is unfortunately requiring Ruby >= 2.7.0 and the CI is not reporting this kind of failures.

Is this the only problem with Ruby 2.7 and 3.0?

@jhawthorn
Copy link
Member

jhawthorn commented Oct 10, 2024

Thanks for the PR but there are other locations which have 2.7 incompatible syntax. 🤞 Hopefully this is fixed in 2.0.3

@jhawthorn jhawthorn closed this Oct 10, 2024
@tipsyhipsy tipsyhipsy deleted the fix_syntax_error branch October 23, 2024 07:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants