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

Reference manual: 19.6 A complete example no longer works in 4.03.0 #7371

Closed
vicuna opened this issue Sep 26, 2016 · 3 comments
Closed

Reference manual: 19.6 A complete example no longer works in 4.03.0 #7371

vicuna opened this issue Sep 26, 2016 · 3 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Sep 26, 2016

Original bug ID: 7371
Reporter: furuse
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2016-10-11T08:50:44Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 4.03.0
Target version: 4.04.0 +dev / +beta1 / +beta2
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: documentation
Related to: #6956
Monitored by: @gasche @hcarty

Bug description

Program with external declaration only mli file fail to link since 4.03.0. I guess this is due to the fix of #4166 and #6956.

The reference manual section 19.6 shows a complete example of adding C primitives in an mli only module but this is no longer working with 4.03.0.

@vicuna
Copy link
Author

vicuna commented Sep 26, 2016

Comment author: furuse

Some conversation about this is found here in Japanese: https://twitter.com/autotaker1984/status/780296049801977856

and the same topic at SO in English: http://stackoverflow.com/questions/39698523/in-ocaml-4-03-0-ffi-fails-to-compile-with-no-implementations-provided-error/39701139#39701139

@vicuna
Copy link
Author

vicuna commented Oct 4, 2016

Comment author: @garrigue

Actually, 4.04 seems to have reverted to the old behavior, which is probably not intended.
We should of course fix the documentation.

@vicuna
Copy link
Author

vicuna commented Oct 11, 2016

Comment author: @garrigue

The manual has been fixed by commit aced03a.
It also adds a test case for this example (tests/manual-intf-c), but this test is currently disabled by default has it depends on curses being available.

Another problem was the lack of error in bytecode, and it has been fixed by commit 6c4023d (Pierre Chambart's #837), and the test updated by commit fcf8bbe,
but it isn't activated by default yet.

An open question is whether it would be better to have a warning than a hard error.
Since 4.03 already had a hard error in this case, this is left to later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants