-
-
Notifications
You must be signed in to change notification settings - Fork 558
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
Rebuild intermediate dependencies [broken] #17
Conversation
This uncovers a problem with scanners.re that was obscured because scanners.c was obsolete.
What version of re2c are you using, on what platform? +++ Ben Trask [Mar 22 15 15:07 ]:
|
re2c 0.14.1 on Linux. Downloaded from here. I'll try with 0.13.6 which seems to be the version you're using. |
The test failures are the same that I got with re2c 0.13.7.5. See commonmark/commonmark-spec#199 |
Also, we're not rebuilding these files for a reason. It simplifies the build on platforms like Windows and there are problems with some versions of re2c and gperf. What is the goal of the pull request? |
The goal is to keep the files in sync in case the .re version is changed (like in my other patch #18). When I rebuilt .c and started getting test failures, I first thought it was because it was out of date or changed manually. I don't know the situation on Windows but I'd suggest including re2c in the cmark repo so that it can be relied on. I'd also submit a PR to add more information recommending re2c v0.13.6 to the readme, if that would be welcome. |
To add a warning about buggy re2c versions would certainly be nice. Ideally, we'd check the version before running re2c. If I find the time, I'll try to create a minimal test case and create a ticket in the re2c bug tracker. Bundling re2c or gperf is a possibility but has some downsides:
For the time being, I'd keep these generated files in version control and update them manually. Maybe we could add some prominent notices that this is necessary. |
Even if re2c isn't bundled, by having the make rules set up, you'll get a build failure if you touch the source files. This seems like desirable behavior to me, it's basically the warning you suggest. You can use |
Using a version control system like Git makes the time stamps of files unpredictable. After an initial checkout with |
+++ Nick Wellnhofer [Mar 24 15 08:35 ]:
I agree. It's also nice that people can build from git checkout without installing anything other than a C compiler. |
I see that I was wrong about modification times in Git. Thanks for the correction. Withdrawing this proposal. |
…uoted-includes Use quoted includes for cmark_export.h and cmark_version.h
Several tests are failing after rebuilding scanners.c. This might be a problem with the version of re2c I have, but I'm not sure.