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

Improve jcc #10783

Merged
merged 12 commits into from
Aug 15, 2023
Merged

Improve jcc #10783

merged 12 commits into from
Aug 15, 2023

Conversation

jonathanmetzman
Copy link
Contributor

@jonathanmetzman jonathanmetzman commented Aug 2, 2023

  1. Put it in a better location on disk.
  2. Move it to its own directory.
  3. Add tests.
  4. Make jcc able to find missing headers.

infra/base-images/base-builder/jcc/jcc.go Outdated Show resolved Hide resolved
return false, true
}
ReplaceMissingHeaderInFile(filename, missingHeader, newHeaderPath)
return false, true
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be true, true?

it's also a bit confusing what these states are.

Is it possible to simplify this into a single bool value indicating whether or not we should keep trying to compile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The second value is whether there are more broken headers. I'll use named return values.
I'm not sure I can combine them though.

@jonathanmetzman jonathanmetzman changed the title Make jcc handle missing headers Improve jcc Aug 9, 2023
retcode, out, err := compile("clang++", cmdline)
fmt.Println(retcode)
fmt.Println(out)
fmt.Println(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to only print them if there is an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. The normal behavior of compilers is to print even when there's no error.

@jonathanmetzman
Copy link
Contributor Author

PTAL oliver.

@jonathanmetzman jonathanmetzman merged commit 45d49c8 into master Aug 15, 2023
16 of 19 checks passed
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