Skip to content

Changes in engine support due to review #1

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

Conversation

bopm
Copy link
Owner

@bopm bopm commented Apr 8, 2025

No description provided.

@bopm bopm requested a review from Copilot April 8, 2025 18:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines +38 to +48
@@tempfile = Tempfile.new("tailwind.application.css")

# Write content to tempfile
engines_roots.each do |root|
@@tempfile.write("@import \"#{root}\";\n")
end
@@tempfile.write("\n@import \"#{rails_root.join('app/assets/tailwind/application.css')}\";\n")
@@tempfile.flush
@@tempfile.close

@@tempfile.path
Copy link
Preview

Copilot AI Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a class variable for temporary file storage may lead to thread-safety issues if compile_command is invoked concurrently. Consider using a method-local variable or thread-local storage for the tempfile.

Suggested change
@@tempfile = Tempfile.new("tailwind.application.css")
# Write content to tempfile
engines_roots.each do |root|
@@tempfile.write("@import \"#{root}\";\n")
end
@@tempfile.write("\n@import \"#{rails_root.join('app/assets/tailwind/application.css')}\";\n")
@@tempfile.flush
@@tempfile.close
@@tempfile.path
tempfile = Tempfile.new("tailwind.application.css")
# Write content to tempfile
engines_roots.each do |root|
tempfile.write("@import \"#{root}\";\n")
end
tempfile.write("\n@import \"#{rails_root.join('app/assets/tailwind/application.css')}\";\n")
tempfile.flush
tempfile.close
tempfile.path

Copilot uses AI. Check for mistakes.

@bopm
Copy link
Owner Author

bopm commented Apr 27, 2025

Tempfile handling should not be manual.

@bopm bopm closed this Apr 27, 2025
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

Successfully merging this pull request may close these issues.

1 participant