Commit Graph

102 Commits (master)

Author SHA1 Message Date
Xavier Leroy a55b0e17dc Test for immediates: also test "checkbound"
Plus: bow to check-typo.
2020-09-17 10:41:16 +02:00
David Allsopp c9d5294b78 Fix check-typo sins 2020-09-11 15:01:14 +01:00
David Allsopp a651a82488 Fix handling of EOL-at-EOF in ocamltest 2020-07-25 10:04:31 +01:00
David Allsopp 3325876e60 Don't display configure in GitHub diffs 2020-08-19 19:55:07 +01:00
Florian Angeletti c99cbd1101 Reorganize release info 2020-07-26 17:45:35 +02:00
Xavier Leroy 1c7d5f4ab4 check-typo attributes for .github directory
Expect no headers, long lines, and very long lines.
2020-05-04 15:25:45 +02:00
David Allsopp f5de44454f Configure GitHub issue tracker 2020-04-30 13:32:59 +01:00
Enguerrand Decorne b7f0494df5 Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
2020-04-30 10:32:01 +02:00
David Allsopp 91913bc505 autogen -> make configure 2018-12-04 10:29:02 +00:00
Kate dc458a0436 More compatibility macros to Caml_state (#9202)
runtime/caml/compatibility.h:
Add compatibility macros for globals that have been moved to Caml_state.
Some of these globals are used by 3rd-party libraries, e.g. delimcc

.gitattributes:
Tolerate long lines in runtime/caml/compatibility.h.
It's better to keep the "one #define per line" style than to introduce
line breaks there.

(cherry picked from commit 073fcbb14ab8c66009beb6ef49c240a24766feac)
2019-12-26 09:50:57 +01:00
Sébastien Hinderer cc40333105 check-typo fix for ocamltest/ocamltest.org 2019-11-29 12:10:33 +01:00
David Allsopp f4b30f0a9b Update tests for CRLF checkouts 2019-10-15 12:22:23 +01:00
Nicolás Ojeda Bär f886217772 .gitattributes: do not show generated boot/menhir/parser.ml* in diffs 2019-07-02 07:59:20 +02:00
Sébastien Hinderer 6bb155f9bb build system: remove the config/ directory
None of the files in this directory is used any more.
2019-06-10 13:56:51 +01:00
David Allsopp 049f4e53ec config/Makefile.m* tidy (#8640)
* Make s-nt.h and m-nt.h more autoconf-like

* Add SIZEOF_LONGLONG to m-nt.h

It's not used, but autoconf will generate it.

* Sections of s-nt.h and m-nt moved to config.h

* Re-order lines of s-nt.h

Allows the output to be more readily compared with autoconf's generated
s.h. Lines are purely reordered so:

diff <(git cat-file --textconv HEAD~1:config/s-nt.h | sort) \
     <(git cat-file --textconv HEAD:config/s-nt.h | sort)

should return no differences.

* Add extra defines to s-nt.h for mingw32

These match up with facts determined by autoconf. The following
additional HAS_ defines are made:

- HAS_UNISTD
    Behaviour of otherlibs/unix/access.c and otherlibs/win32unix/lseek.c
    is affected but the effect is correct.
    Behaviour of runtime/fix_code.c affected, but unistd.h includes
    io.h, so there's no effective change.
    In other cases, unistd.h is simply included where before it wasn't.
- HAS_DIRENT
    Used in Unix-only closedir.c, opendir.c, readdir.c and rewinddir.c
    Used in runtime/unix.c, but that obviously won't affect Windows!
- HAS_REWINDDIR
    Used in Unix-only rewinddir.c
- HAS_TRUNCATE
    Used in Unix-only ftruncate.c, mmap.c and truncate.c
- HAS_NANOSLEEP
    Used in Unix-only sleep.c
- HAS_GETTIMEOFDAY
    Used in vmthreads and Unix-only gettimeofday.c
    Used in runtime/sys.c, but in a branch guarded by #ifndef _WIN32
- HAS_MKSTEMP
    Changes yacc/main.c to use the MinGW implementation of mkstemp
    (part of mingwex, which is linked by flexdll)

* Remove the old DISTRIB variable

This variable was originally added in 1973b55 and 1596174 and was always
specifically for Windows for installing the README files.

This should have been renamed to INSTALL_DISTRIB in de4f4cf (which was
part of MPR#6358/GPR#27). It should then have been removed in 13bb9d2
(GPR#1033).

May it forever rest in peace.

* Tweak the config/Makefile.m* to match autoconf

* Build debug runtime by default on Windows

* Build raw_spacetime_lib on msvc64 & mingw64

* Set ENABLE_CALL_COUNTS to true for Windows

No-op, since spacetime is not enabled by default, but easier comparison
with autoconf

* Remove X11 definitions from old Makefiles

win32graph removed in #2318

* mingw ports should use gcc for CPP

* Correct MKEXEDEBUGFLAG for mingw ports

-g is ignored by flexlink, -link -g is passed on to GCC.

* Correct SO to be dll not s.obj/s.o

Pedantic correction - $(SO) is not used by the Windows ports.

* Re-order lines of config/Makefile.m*
2019-05-14 15:03:43 +02:00
Gabriel Scherer 3b5cda4d27 Merge pull request #8604 from gretay-js/pr2207
Add opam files to allow pinning

(cherry picked from commit e89287f056b3641af214f8d71717c6fa81de531b)
(version changed 4.08 => 4.09)
2019-04-12 14:28:47 +02:00
Sébastien Hinderer 49ce3b0611 Revert "Get rid of the stdlib/Compflags script (#8601)"
This reverts commit 0dec0ce9d6.
2019-04-11 15:52:41 +02:00
Sébastien Hinderer 0dec0ce9d6
Get rid of the stdlib/Compflags script (#8601)
This script was used to provide module-specific compiler flags.
Now that we use GNU make, these flags can be handled by make itslef.
2019-04-10 10:57:05 +02:00
David Allsopp 5c6860b2cc Make configure "binary" 2019-04-02 16:35:36 +01:00
Damien Doligez 46f901bb94 Small fixes to release-checklist 2019-03-22 15:13:41 +01:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Nicolás Ojeda Bär bd69c678c2 Add CSV file with Mantis=>GitHub renumbering information 2019-03-15 00:01:48 +01:00
Sébastien Hinderer cc3f70b705 Use autoconf to generate the compiler's configuration script 2018-12-21 16:02:47 +01:00
Gabriel Scherer bf72878ee3 .gitattributes: prune directories recursively
Before this change, check-typo would run on manual/Makefile for
example, while this file lives within a pruned directory so it
ought to be ignored by the tool.

Note: the check-typo code seems to assume that the only pruned things
are directory, it prints "pruned directory ..." when something is
pruned. I haven't changed this part of the logic; but note that normal
./check-typo invocation will only check pruning for directories.
2018-12-09 13:31:26 +00:00
David Allsopp 7bc0b8b2da Testsuite files requiring LF endings for Cygwin 2018-11-24 21:05:14 +00:00
David Allsopp dc8efd887d Testsuite files requiring LF endings for Windows 2018-11-24 19:07:45 +00:00
Florian Angeletti 9f01a08a2b
Merge pull request #2117 from Octachron/stdlib_precedence_table_3
documentation: precedence table for the standard library.
2018-11-06 22:18:48 +01:00
Florian Angeletti c951d3c300 documentation: no header for mld files 2018-11-04 18:12:19 +01:00
Gabriel Scherer 2e596686da testsuite: convert typing-unboxed-types to expect-style tests
This will be very useful for an upcoming PR implementing a different
unboxing check, which change the result for some of the tests. Without
the present change, the diff in test results was unreadable, which
is problematic for development and for code review.
2018-10-31 10:58:25 +01:00
Gabriel Scherer 7f65f2cff8 Release highlights for 4.07.0 in a new 'News' file 2018-10-28 11:29:18 +01:00
Gabriel Scherer e63e9c6989 add a minor script to turn ASCII references into Markdown links 2018-10-28 11:29:17 +01:00
Gabriel Scherer 2713258fbd robustly prune manual files 2018-10-22 17:20:12 +02:00
Armaël Guéneau 2ce52c9e2a unified-options.etex: make check-typo happy 2018-10-20 16:11:27 +02:00
Armaël Guéneau 39b8254319 Allow long lines in tests 2018-10-20 12:03:31 +02:00
Damien Doligez 197f509b99 GPR#1910: rename .reference.* files 2018-10-19 15:11:55 +02:00
Gabriel Scherer 2c5bde091b address review comments by David and Damien 2018-10-18 13:44:48 +02:00
David Allsopp af38eb2c0d Make typo.very-long-line => typo.long-line=may
typo.long-line can still be explicitly set in .gitattributes (and
typo.long-line typo.very-long-line=may will still issue unused if no
lines are more than 80 columns)
2018-10-18 13:44:48 +02:00
Gabriel Scherer 42abe7b13d check-typo: silence minor warnings 2018-10-18 13:44:48 +02:00
Gabriel Scherer 321f219d98 check-typo: remove useless gitattributes 2018-10-18 13:44:48 +02:00
Gabriel Scherer 26cec302ee check-typo: simplify implementation by deconstructing the built-in exceptions 2018-10-18 13:44:48 +02:00
Gabriel Scherer 5c0024fe67 rework the relation between .gitattributes and ./tools/check-typo
Before this patch, check-typo is directed by a single git attribute,
ocaml-typo, which is used as a key to set a value:

    ocaml-typo=long-line,missing-header

(the value here is `long-line,missing-header`, and the code splits the
comma later)

This model is very fragile because .gitattributes does not allow to
give attribute keys a collecting/aggregating semantic: each new
setting of the key removes the previous setting, instead of adding to
them. For example,

    testsuite/tests/**                      ocaml-typo=missing-header
    testsuite/tests/win-unicode/*.ml        ocaml-typo=utf8

and

    testsuite/tests/win-unicode/*.ml        ocaml-typo=utf8
    testsuite/tests/**                      ocaml-typo=missing-header

are not equivalent, and instead of using either one we would introduce
redundancy for robustness:

    testsuite/tests/**                      ocaml-typo=missing-header
    testsuite/tests/win-unicode/*.ml        ocaml-typo=missing-header,utf8

With this patch, we switch to a model where each ocaml-typo setting is
its own attribute, of the form `typo.<<attribute>>`. The lines above
would be written, in either order:

    testsuite/tests/**                      typo.missing-header
    testsuite/tests/win-unicode/*.ml        typo.utf8

Not only does this approach make our .gitattributes more robust, it
allows for a more fine-grained treatment of the "unused-prop"
marker. This was used as an attribute to say: don't make it in an
error if the given typo-rule is in fact respected (by default, opting
out of a typo-rule gives an error if the typo-rule is respected). But
because of the single-key nature of ocaml-typo, unused-prop would
range over all settings, not just one of them. For example

    emacs/caml.el ocaml-typo=long-line,unused-prop,missing-header

seems to suggest that 'unused-prop' only qualifies the 'long-line'
rule, but in fact it also ranges over 'missing-header'. In contrast,
with this patch, we write the following:

    emacs/caml.el typo.long-line=may typo.missing-header

the `=may` value setting is used to make an exception to a typo-rule
optional.
Interestingly, most .gitattributes lines worked without extra error
when I turned each unused-prop in a =may setting over the rule just
before, instead of all rules: our checking is now more precise than
before, better capturing the intent of the .gitattributes author.

As I had to rewrite parts of the check-typo code for this, I took the
opportunity to rename a couple variables speaking about SVN (now long
defunct) into more meaningful names:

- `$is_svn` => `$path_in_index`
- `$svnrules` => `$attr_rules`
2018-10-18 13:44:48 +02:00
Gabriel Scherer ecd5275ad3 add a release checklist (#1866)
* add a release checklist

Currently this list isn't publicly available, it sits in various
different versions on @damiendoligez's filesystems. He sent me a copy
when I took care of some of the recent releases. The present
presentation is a result of significant cleanups and changes to the
checklist -- in particular, some mistakes may have jumped in.

This is not a scripted process, it is very informal and it is likely
that there are some mistakes/omissions in the list. Yet, it sounds
better to have it somewhere in the source repository than not have it
around at all. It was certainly helpful to me, and it probably would
be to other release-help volunteers.

(The list is put in tools/ because there isn't a clearly better place
for it. This choice was suggested by Damien.)
2018-10-04 14:32:14 +02:00
Sébastien Hinderer 1cf82b57c5 Remove spurious blank lines in .gitattributes 2018-09-25 12:56:40 +02:00
Gabriel Scherer ef00dc7317 remove experimental/
This subdirectory was used to store experimental patches on some older
version-control system where branching (or discussing branches?) was
inconvenient. It doesn't make much sense anymore now, and getting rid
of it simplifies a couple places that had to grow around it.

Suggested-by: Nicolás Ojeda Bär

(no change entry needed)
2018-09-08 16:53:08 +02:00
Gabriel Scherer d09349f631 rename parsing/parser_menhir into parsing/parser 2018-09-01 23:17:06 +02:00
Gabriel Scherer b4a56926de add Changes entry and .gitattributes-checktypo magic 2018-09-01 23:17:04 +02:00
Sébastien Hinderer 84821420b5 Fix the remove-sinh-primitive patch
This patch is used during the bootstrap CI job.

Moreover, the patch should be exempted from the long-line check-typo rule.
2018-08-28 08:37:03 +02:00
David Allsopp 2adc6af92a Correct .gitattributes for ocaml-typo=prune
Without the leading slash, these apply in multiple places.
2018-06-30 16:58:35 +01:00
David Allsopp 546dd121cb Supply a Git pre-commit hook for tools/check-typo
Automatically runs tools/check-typo and rejects the commit if they don't
pass.
2018-06-30 16:43:32 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00