Skip to content

Conversation

@perlpunk
Copy link
Contributor

Summary

Call sass with the --trace option to get a backtrace in case of an error.

Motivation

Sometimes there are errors like this:

TypeError: String can't be coerced into Integer
  Use --trace for backtrace.

The input is not logged, and not even the line number & file. Hard to debug when the error is not easily reproducible.

References

@perlpunk
Copy link
Contributor Author

perlpunk commented Jun 17, 2024

A related question: if sass actually fails, how can we react to it? We see the error in the log, but the webserver is started anyway.

@Martchus
Copy link
Contributor

It would probably make sense to abort the startup. Not sure whether sass actually exists with a non-zero return code here.

@perlpunk perlpunk mentioned this pull request Jun 18, 2024
@perlpunk
Copy link
Contributor Author

With the trace option we were able to find out the problem. The latest bootstrap css seems to use features that ruby sass isn't prepared for. See https://progress.opensuse.org/issues/162311#note-21 ff.
We added a patch for openSUSE.
Meanwhile I created #151 to support sassc.

@kraih
Copy link
Member

kraih commented Jun 18, 2024

Thanks. Don't think we can merge anything before our CI setup is fixed unfortunately.

@kraih
Copy link
Member

kraih commented Jun 19, 2024

Rebase on main.

Sometimes there are errors like this:

    TypeError: String can't be coerced into Integer
      Use --trace for backtrace.

The input is not logged, and not even the line number & file.
@perlpunk
Copy link
Contributor Author

Rebased

@kraih kraih requested review from a team, Grinnz, christopherraa, kraih and marcusramberg June 20, 2024 11:27
Copy link
Member

@kraih kraih left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

@kraih kraih merged commit 4bf1fca into mojolicious:main Dec 6, 2024
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.

3 participants