[Ur] Proposed location literals to track caller's location in error msgs.
Gabriel Riba
gabriel at xarxaire.com
Thu Jun 4 08:30:34 EDT 2015
Added the wiki page as
http://www.impredicative.com/wiki/index.php/Compiler_contributions_procedure
I have added a link in the main index page
http://www.impredicative.com/wiki/index.php/Ur
Your wiki lacks the syntax highlighting extension
(https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi) so I
changed the "source" tag with a "pre" tag.
This syntax highlighting extension lacks a specific "sml" directive set
but usually "ocaml" gives a good result for keyword highlighting.
El 04/06/15 a les 13:35, Adam Chlipala ha escrit:
> If you think such a wiki page would be useful, would you mind adding it
> yourself? Do you not have write access on the Ur wiki yet? In that
> case, please create an account there and let me know its name.
>
> On 06/04/2015 06:49 AM, Gabriel Riba wrote:
>> El 03/06/15 a les 15:57, Adam Chlipala ha escrit:
>>> On 06/03/2015 09:26 AM, Gabriel Riba wrote:
>>>> Here comes the mercurial patch with both the _LOC_ in urweb.lex and
>>>> the "assert" function in top.ur
>>>
>>> Thanks, patch accepted. I had to add some fixes to make it actually
>>> work in top.ur; I presume testing only happened with the code at some
>>> other location.
>>
>> A wiki page could be added telling the procedure to test compiler
>> contributions, since it is not straight.
>>
>> Here is the proposed content from my experience, and it is the
>> procedure used in checking the proposed _LOC_ patch:
>>
>> Here follows a wikimedia "source" tag for proper wiki syntax
>> highlighting:
>>
>> <source lang="bash">
>> #create the mercurial initial file ".hgrc" with your id
>> cat <<EOD > ~/.hgrc
>> [ui]
>> username = My name <my.account at mail-server.com>
>> EOD
>>
>> mkdir -p ~/ur/mercurial-base-folder
>> mkdir ~/ur/testcompiler
>>
>> cd ~/ur/mercurial-base-folder
>>
>> # remove previous checkout if existant
>> rm -Rf urweb
>>
>> # Clone the default branch
>> hg clone http://hg.impredicative.com/urweb
>>
>> cd urweb
>>
>> # autoconf to generate the configure file
>> ./autogen.sh
>>
>> # configure, specifying a destination folder for the compiler
>> ./configure --prefix=$HOME/ur/testcompiler
>>
>> # edit the sources
>>
>> # compile, link and install
>> make && make install
>>
>> # add the test-compiler to the environment paths head
>>
>> export URW_HOME=$HOME/ur/testcompiler
>> export PATH=$URW_HOME/bin:$PATH
>> export LD_LIBRARY_PATH=$URW_HOME/lib/:$LD_LIBRARY_PATH
>> export LIBRARY_PATH=$URW_HOME/lib/:/usr/local/lib:/usr/lib:/lib
>> export C_INCLUDE_PATH=$URW_HOME/include
>>
>> # test the patched-compiler with a urweb test project
>>
>> # back to the compiler sources
>> cd ~/ur/mercurial-base-folder/urweb
>>
>> # check the modified source files
>> hg status
>>
>> # add, if necessary, any extra files to mercurial tracking
>> hg add somefile
>>
>> # commit the patch
>> hg commit -m "my patch comment"
>>
>> # list the patch,
>> hg log -l5 # list the last n commits -ln
>>
>> # generate the diff for the change-set identifiers REV1 REV2 ...
>> hg export REV1 REV2 > ~/some-folder/my-patch.diff
>>
>> # send the exported diff file
>> </source>
More information about the Ur
mailing list