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

[build bug] Modifying gumbo source doesn't cause rebuilds #2718

Open
stevecheckoway opened this issue Dec 8, 2022 · 2 comments
Open

[build bug] Modifying gumbo source doesn't cause rebuilds #2718

stevecheckoway opened this issue Dec 8, 2022 · 2 comments
Labels
state/needs-triage Inbox for non-installation-related bug reports or help requests

Comments

@stevecheckoway
Copy link
Contributor

Please describe the bug

Modifying the gumbo source files doesn't cause rake compile:nokogiri to rebuild the extension.

Help us reproduce what you're seeing

  1. Compile the extension with rake compile:nokogiri
  2. Touch a gumbo source file: touch gumbo-parser/src/util.h
  3. Recompile the extension with rake compile:nokogiri
$ bundle exec rake compile:nokogiri
/usr/bin/make install target_prefix=
install -c -p -m 755 nokogiri.bundle /Users/steve/programming/nokogiri/lib/nokogiri
cp tmp/arm64-darwin21/nokogiri/3.1.2/nokogiri.bundle tmp/arm64-darwin21/stage/lib/nokogiri/nokogiri.bundle
$ touch gumbo-parser/src/util.h
$ bundle exec rake compile:nokogiri
cp gumbo-parser/src/util.h tmp/arm64-darwin21/stage/gumbo-parser/src/util.h
/usr/bin/make install target_prefix=
install -c -p -m 755 nokogiri.bundle /Users/steve/programming/nokogiri/lib/nokogiri
cp tmp/arm64-darwin21/nokogiri/3.1.2/nokogiri.bundle tmp/arm64-darwin21/stage/lib/nokogiri/nokogiri.bundle

Note that the extension was already compiled for the first invocation so nothing needed to be done. In the second compilation, it also thinks there's nothing to do. (The same holds true if you actually modify the file, not merely touch it, but touching is traditionally sufficient for build systems.)

Expected behavior

I expect the gumbo library to be recompiled (or at least the parts of it that were changed) and the nokogiri.bundle to be rebuilt.

Environment

  • I'm building the main branch.
  • ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
  • macOS 13.0.1
@stevecheckoway stevecheckoway added the state/needs-triage Inbox for non-installation-related bug reports or help requests label Dec 8, 2022
@stevecheckoway stevecheckoway changed the title [bug] Modifying gumbo source doesn't cause rebuilds [build bug] Modifying gumbo source doesn't cause rebuilds Dec 8, 2022
@flavorjones
Copy link
Member

Thanks for opening this issue up, this has been mildly annoying me, too.

It's a side effect of how I ended up implementing the libgumbo build, as a separate library and not part of the extension -- using the packaged_tarball strategy.

Maybe that was a mistake, especially given your notes about link-time optimization in #2331, and I should have picked packaged_source instead. I'll play with it a bit and see if I can convince myself to do it this way.

@stevecheckoway
Copy link
Contributor Author

This is definitely not a priority. I just noticed it and thought I'd make a note of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/needs-triage Inbox for non-installation-related bug reports or help requests
Projects
None yet
Development

No branches or pull requests

2 participants