profile
viewpoint
Patrick Stapfer ryyppy @reason-association Speaker & Wannabe System Engineer

ocaml/dune 985

A composable build system for OCaml.

reason-association/genType 610

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.

reason-association/reasonml.org 130

WIP Reason / BuckleScript documentation platform with intelligent design and UX

reason-association/reanalyze 126

Experimental analyses for OCaml/Reason: for globally dead values/types, exception analysis, and termination analysis.

cristianoc/genTypeScript 76

Auto generation of type-safe bindings between Reason and Typescript.

bsansouci/dojo-europe 16

Starter project for our Europe-wide (+ more) Dojo

antwarjs/antwar-reason 5

A static site generator with Reason

gcanti/flow-style 5

Generic typed styles for Flow (WIP Help wanted)

pull request commentrescript-lang/rescript-compiler

Playground New ReScript JS API 2020

@bobzhang Would be great to get some review on this. The main work happened all in jscomp/refmt/jsoo_refmt_main.ml

ryyppy

comment created time in 11 hours

push eventryyppy/bucklescript

Patrick Stapfer

commit sha 8062b2fb3841cc4d1b95ff12e5c1ae9753ad2541

Rename global namespace to rescript_compiler also add the version to the bundle export

view details

push time in 12 hours

push eventryyppy/bucklescript

Hongbo Zhang

commit sha e8546d363db24bff948fd18128fb4f685b163090

[cherrypick] ignore syntax in distribution, add shell:true to sapwnSync

view details

Cheng Lou

commit sha f87b1710e6b450ab890c72795a25f50090691b1d

Remove Unix dependency from syntax; sync up again

view details

Hongbo Zhang

commit sha 16625f48fc91d55fb04420a3661d94ba380d5283

Merge pull request #4530 from chenglou/lastlast Remove Unix dependency from syntax; sync up again

view details

Hongbo Zhang

commit sha 64926028d4c14edd0194df318c43bb4586e01424

tweak

view details

Hongbo Zhang

commit sha 3505e663eedf9120a656bd2667e26a3a7a22a409

snapshot

view details

Hongbo Zhang

commit sha a084c99ea0af39dc8d2e7bb5578faa593f2e444d

tweak -- less pattern match for mutable data structure

view details

Hongbo Zhang

commit sha e50df910bada8041b6c1fda07b81d8a241157ec2

makes the code more readable

view details

Hongbo Zhang

commit sha c9301e0088824e670010b5d582041379b837535a

shave some bytes

view details

Hongbo Zhang

commit sha 38cc849e0391533c8b7b12a1ae619dde7f74de3c

snapshot

view details

Hongbo Zhang

commit sha 24b8ac485d85de8395b095bdd41d8f10b6530b55

shave some bytes

view details

Hongbo Zhang

commit sha 1144a7540d7bbb07cfda9587a176d27a41b89d0d

snapshot

view details

Hongbo Zhang

commit sha 870b117ece34520313303de6b092a8bd0b6fcd80

tweak

view details

Hongbo Zhang

commit sha a206e9e6de518cb034b67b4daac6ea4d426091bb

tweak

view details

Hongbo Zhang

commit sha 926c90f97de3ebbcbe9b3b10cc9fbe70c84e82e5

snapshot

view details

Hongbo Zhang

commit sha aea62c08d01067083ad142006b7ae201916a74d6

tweak

view details

Hongbo Zhang

commit sha 43558b6c87bc9d868502748de40f4088924e2ef2

snapshot

view details

Hongbo Zhang

commit sha 9f6ffcaebd13b2a76272161031f654c1f6de5a66

Merge pull request #4531 from BuckleScript/tweaks_around_belt tweaks around belt

view details

Hongbo Zhang

commit sha 25930546b40288922928b7ec51ed37cd86bb02d6

refactor the API

view details

Hongbo Zhang

commit sha 9ead65a5a5d8444d8af45adec6109b886e57ca26

refactoring

view details

Hongbo Zhang

commit sha f55a2800dde3f49fd8db40adac96daf60dac26ca

make use es6 record punning

view details

push time in 16 hours

delete branch rescript-lang/rescript-compiler

delete branch : playground-napkin-support

delete time in 16 hours

create barnchrescript-lang/rescript-compiler

branch : playground-napkin-support

created branch time in 16 hours

push eventryyppy/rescript-benchmark-tool

Patrick Stapfer

commit sha eec73ac148cd70f233819deff8e6dc63f4f34798

Update README.md

view details

push time in 16 hours

push eventryyppy/rescript-benchmark-tool

Patrick Stapfer

commit sha 172d8c2e124b42a6eea878f478bac09c8fde3634

Update README.md

view details

push time in 16 hours

push eventreason-association/rescript-lang.org

Patrick Stapfer

commit sha 3a01fc6f005f229395bdac95d470228399cabd7f

Make test-examples exit with code 1 if test failed

view details

push time in 16 hours

push eventreason-association/rescript-lang.org

Patrick Stapfer

commit sha c5e5b2aed5436c8c692d150f2d31d72f2fc147a2

Refactor layout names, add better meta titles for subpages

view details

Patrick Stapfer

commit sha 00aea825051eb39c051e934226327cad4229fdb6

Update README regarding api paths

view details

Patrick Stapfer

commit sha b8e564e37a89f764a2b8cd1b223c68a3b581c433

Remove unnecessary apis.mdx page

view details

Patrick Stapfer

commit sha 642a61c40d5eaf5201aadfeb1c9812906aba6283

Merge pull request #14 from reason-association/improve-meta-titles Refactor layout names, add better meta titles for subpages

view details

push time in a day

push eventreason-association/rescript-lang.org

Patrick Stapfer

commit sha b8e564e37a89f764a2b8cd1b223c68a3b581c433

Remove unnecessary apis.mdx page

view details

push time in a day

push eventreason-association/rescript-lang.org

Patrick Stapfer

commit sha 00aea825051eb39c051e934226327cad4229fdb6

Update README regarding api paths

view details

push time in a day

create barnchreason-association/rescript-lang.org

branch : improve-meta-titles

created branch time in a day

PR closed reason-association/reasonml.org

Initial Playground Version

This is the tracking branch for the upcoming playground

+4896 -27

1 comment

28 changed files

ryyppy

pr closed time in 2 days

pull request commentreason-association/reasonml.org

Initial Playground Version

This PR is outdated due to the rebranding of BuckleScript + Reason to ReScript The final implementation is merged in here: https://github.com/reason-association/rescript-lang.org/pull/1

Check out https://rescript-lang.org/try for the production build

ryyppy

comment created time in 2 days

push eventreason-association/rescript-lang.org

Patrick Stapfer

commit sha e2250f2fdd81af0530a072378b73a8c418940559

Update initial example in playground

view details

push time in 2 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 2056c169683ce7aa150af8ad79b773368b0f3ab5

Highlight ReScript in bold in blog post

view details

push time in 2 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 11cec31cc8bc8aa9a408ba666fc5290f604ce44d

Fix punctuation

view details

push time in 2 days

delete branch reason-association/reasonml.org

delete branch : brand-blog-post

delete time in 2 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha d2c28f03ae4987b429a530b3177239d2de8e7cd4

Add rebranding blog post

view details

Patrick Stapfer

commit sha 9a7b0d16375afbdb8f355885d21825da25e9fb22

Add twitter link

view details

Patrick Stapfer

commit sha 20987a433a1fc1f2fd0a2eb6e2cd06c9e425244f

Merge pull request #237 from reason-association/brand-blog-post Add blog post

view details

push time in 2 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 9a7b0d16375afbdb8f355885d21825da25e9fb22

Add twitter link

view details

push time in 2 days

create barnchreason-association/reasonml.org

branch : brand-blog-post

created branch time in 2 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 8dbaaac38eae9adaa751ffcfd916094f2b23fe35

Set flags to -a if all flags get deleted

view details

push time in 7 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 3f6284f55b564274cbaa3f0103b32db0954cd4c2

Keep current input when warn flags component looses focus

view details

push time in 7 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 9f95cd102a6a2ad0b08704b4a9bfc32f5643ef51

Allow mouse selection on warning flag autocompletion list

view details

push time in 7 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 53014f9686b0fdeb86a2beb959effc70030ef601

Add settings reset button, add warning flag chip hover behavior

view details

push time in 7 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha c09be7ea84032b542ce2c3c4fb085dcc104afd37

Add Settings panel with warning flag autocompletion component

view details

push time in 8 days

issue commentreason-association/reasonml.org

Example for [%raw] does not work in .res file

All examples are still in Reason syntax (recognizable by the extension name in the top right corner of each snippet):

image

We will make an announcement when all examples are also available in the new syntax as well (those will be marked as RES)

jdeisenberg

comment created time in 8 days

issue commentBuckleScript/bucklescript

Add git commit hash to bs_version.ml

Found a solution that doesn't involve any diffs / build system changes. This will be fixed by #4518

ryyppy

comment created time in 9 days

issue commentBuckleScript/bucklescript

Allowing dashes and other characters in the string literal type on reason and ocaml using an extension point

@jfrolich @chenglou this feature has been out for like 2 days.. would it make sense to get some more feedback / hands-on experience with the current state until we decide on adding more features?

I looked at the ReasonReactNative API and checked some bindings to get an idea on what you are referring to... i find things like this:

~clearButtonMode: [@bs.string] [
                        | `never
                        | [@bs.as "while-editing"] `whileEditing
                        | [@bs.as "unless-editing"] `unlessEditing
                        | `always
                      ]

I guess your complaint is that you want to use the newest feature to represent that clearButtonMode, right?

Currently trying to understand what's the problem here, because we went from "would be useful to express dashes in poly-variants" to "I can't build any real world apps with that feature", which I don't believe is true? Or did the new representation break any existing code for you?

jfrolich

comment created time in 9 days

pull request commentreason-association/reasonml.org

Fix Error component path

thanks!

dcalhoun

comment created time in 9 days

push eventreason-association/reasonml.org

David Calhoun

commit sha 6e17e1afc1365300b2bb4072ef89977bcc610af1

Fix Error component path It would appear the path used for the Next.js `Error` component was incorrect, based on the [documentation](https://github.com/Raimondi/delimitMate/issues/287).

view details

Patrick Stapfer

commit sha 6a9be941de46cc19209bbc4177e143d3f8a9a8b6

Merge pull request #229 from dcalhoun/fix-error-component-path Fix Error component path

view details

push time in 9 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha da683fb6f159daad2f92dd91367e604ba300b7ef

Add v8.2.0-dev.5

view details

push time in 13 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 04924be2b8f1d9cbabcef9e4ba0d3a3ff1d553de

Use RES instead of "New BuckleScript Syntax" wording

view details

push time in 13 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 5ac8707e7388bccb072e6a8ad087ddf6de77a394

Change the syntax switching mechanism The syntax switching mechanism will always switch syntax, and show the syntax error message of the selected syntax instead of preventing the user to switch syntax.

view details

push time in 14 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha d791b3679bde133721128567f5b1062fe8cb1990

Fix error hover display for syntax errors on convertion

view details

push time in 14 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 1667fc5c4d70e96b0499b90b4ee0b3db64ba14d2

Upgrade to Tailwind 1.6

view details

Patrick Stapfer

commit sha 23ed503188974833f87e2574111e66ce5fb2fd28

Fix DecodingErrors not being caught

view details

Patrick Stapfer

commit sha 92acec5132673e46851fa46b3167b6636affd3f8

Remove Js.logs

view details

Patrick Stapfer

commit sha 78621b098e6945b567428be81fdf3a72d3c09399

Add onAction parameter to useCompilerManager

view details

Patrick Stapfer

commit sha 0a894a68942c92007956c42ca283edfc2467de85

Add UI improvements error reporting, activity indication, layout

view details

push time in 14 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha f3966cbd4ed661f3f59f8c3287c5c741f7a1896f

Update TODOs, fix typo

view details

push time in 14 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 940a2ded30e495a65edd563827bc821f5645a703

Refactor ErrorPane message printing, add CM error hovering

view details

push time in 14 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha 388cdf3768b161be1b7c9ace817cbdfb958448c4

Add v8.2.0-dev.4 release

view details

push time in 15 days

issue openedBuckleScript/bucklescript

Add git commit hash to bs_version.ml

I am regularly building BuckleScript JS bundles out of non-tagged revisions of BuckleScript and it's hard to keep track on what exact BS code the bundle is based on.

Is it possible to extend the build_version.js script in a way that generated following (extended) bs_version.ml file? I'd expect a module something like this:

let version = "8.2.0"
let header = 
   "// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE"  
let package_name = "bs-platform"   

let git_commit = "123456"

That way we can easily provide full version info in the playground and render a direct link to the exact commit as well

created time in 15 days

Pull request review commentreason-association/reasonml.org

post about string literal types

+---+author: hongbo+date: "2020-07-28 18:00"+previewImg:+category: compiler+title: Introducing string literal types in BuckleScript version 8.2+description: |+  Highlights of our newest changes to the internal representation +  and how they will benefit our users.+---++---

Remove that dangling ---

bobzhang

comment created time in 15 days

issue closedreason-association/reasonml.org

[Bucklescript] install via yarn fails with env: python: No such file or directory

Installing bucklescript via yarn add --dev bs-platform fails on building ninja with message env: python: No such file or directory

In fact on my machine, there's no python executable, only python3.

# yarn --version
1.22.4
# python3 --version
Python 3.7.8
# uname -a
FreeBSD DaemONX 11.4-RELEASE-p1 FreeBSD 11.4-RELEASE-p1 #0: Tue Jul  7 08:51:03 UTC 2020     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

bs.log

closed time in 15 days

serpent7776

issue commentBuckleScript/bucklescript

Install via yarn fails with env: python: No such file or directory

The python executable needs to be provided by the user, so maybe as a quickfix, could you symlink python3 to /usr/local/bin/python and see if the installation works?

serpent7776

comment created time in 15 days

pull request commentBuckleScript/syntax

Exit parser instead of raising error

I think this will actually not interfere with the JSOO implementation since we are overriding the Napkin_driver functionality and using bits of the Napkin_diagnostics module directly

chenglou

comment created time in 15 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha 01ea477a00cb7fad1384ce9ca67c795f72307edd

Add v8.2.0-dev.3 release

view details

push time in 15 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha abc58b4ca9850807a9ab4ae136f7194d9417170d

Playground: Make sure to reset compiler on every compile This fixes an issue where warnings would disappear after a second compile (part of the AlreadySeen mechanism I think). Also it makes sure to reset the environment to a point where it doesn't delete the already loaded cmi cache (in case of ReasonReact, every compile would take several seconds otherwise)

view details

push time in 15 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha e1488fb01d8c1a5de0674ca1b573936ec8e44ade

Add CHANGELOG

view details

push time in 16 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha 440ec3f3cf07b444f4468ad0cc0c28e724158526

Add v8.2.0-dev.2

view details

push time in 16 days

issue commentreason-association/reasonml.org

[Bucklescript] install via yarn fails with env: python: No such file or directory

Hey! This issue relates to the compiler toolchain. Could you open it up in the BuckleScript repo?

serpent7776

comment created time in 16 days

issue openedreason-association/reasonml.org

Upgrade to Next@9.5

See: https://nextjs.org/blog/next-9-5

created time in 16 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 3f7fdf7b52c74b83603a8c35b549a23253d05130

Adapt bs-platform bundle bindings to newest changes

view details

Patrick Stapfer

commit sha df0703ad1f2c214f1cf41ef393f7724411a1a8cd

Add UseCompiler module using the new bs bundle bindings

view details

Patrick Stapfer

commit sha e7ab2bf3c588a67483e93c7ee9df445c16f4136d

Further refinements for the Bs bundle bindings

view details

Patrick Stapfer

commit sha 1ccffea7549b7384912cb6f7ff00eae601ce09aa

Rename UseCompiler to CompilerManagerHook

view details

Patrick Stapfer

commit sha 30f3e71f186cda85f5e22a2844a6fd01ac9c20b3

Use new bindings in playground UI

view details

push time in 16 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha f21884853ff53c86d5fd591101850f41204a5b24

Playground: Some small API refinements

view details

push time in 16 days

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha d7776de86121b0b2a921930fd08ba673cea92579

Add v8.2.0-dev.1, first version of apiVersion 1

view details

push time in 16 days

pull request commentocaml/odoc

Remove 402 support

Relevant changes are in the package.json file, as stated here

ryyppy

comment created time in 19 days

PR opened ocaml/odoc

Remove 402 support

This will update the esy configuration to ocaml 4.06 (dropping 4.02.3 support).

@jonludlam can you verify if this unbreaks your CI tests?

Maybe @aantron / @ulrikstrid could have a quick look at this as well, since they have been involved in the esy setup afaikt?

+4679 -5

0 comment

70 changed files

pr created time in 19 days

create barnchryyppy/odoc

branch : remove-402-support

created branch time in 19 days

push eventryyppy/odoc

Rizo Isrof

commit sha a300e457ed9721df299289fc1144a96a80b9b7f2

Print preamble for nested items (#194)

view details

Rizo Isrof

commit sha b6e4edca20c138665bef433a5e20825e9577a091

Add custom remote fonts. Small visual adjustments. (#208) Add custom remote fonts. Small visual adjustments.

view details

Luke Czyszczonik

commit sha dfdcbac8c7e01e45a24b50fb2e60cc4df2656fb0

Add info to Readme about pinning odoc (#211) Update BuckleScript installation instructions

view details

Anton Bachin

commit sha 335b64b480272c24cada97a5718d77aeec5c746c

CONTRIBUTING.md: link to projects and milestones cc @ostera. Part of #210. [skip ci]

view details

Anton Bachin

commit sha 2c8302b23fc67d134d96a25d96a2acc00d5aafe3

README: link directly to text of CONTRIBUTING.md [skip ci]

view details

Rizo Isrof

commit sha 4ca7674bacee5d12be4505a55481dcf767a383ea

Move top doc for nested items to header similar to root module.

view details

Rizo Isrof

commit sha c37f7c65bc266a06972969fa51430e38191c362a

Additional stylistic changes (fixes inconsistent spacing, font sizes, etc).

view details

Anton Bachin

commit sha b6d24728dd3842ac87063d00e0c456288147b1b3

Constrain sexplib version sexplib is a development dependency of odoc. We need at least version 113.33.00, for consistent escaping of characters with numeric values above 127. See https://github.com/janestreet/sexplib/blob/57d2a5a03bfcfe5a81a003b1e112283cf6a4ccbd/CHANGES.md#1133300

view details

Anton Bachin

commit sha c36d1e76ee23cec1527ada50476fe08181196496

odoc.opam: result is a build dependency

view details

Leandro Ostera

commit sha 31ad3f685772eea9580740545330d56c219164ac

Setup npm packaging + Create package.json for 4.02.3005 switch with necessary dependencies + Make targets to build, test, and package for npm + Ignore esy output folders

view details

Leandro Ostera

commit sha 1d82020c71ed0073e3be80eb5a0ac75515bb0d70

Build, test, and package for npm on Travis

view details

Leandro Ostera

commit sha 7a8a8a0519ba67e6de3b63775540bf6038dcd604

Cache opam switch and dune build modulo _scratch This will cache the opam switch and parts of the dune build, making sure that the test-generated files (located in the `_scratch` folder) are always cleaned up before running the tests.

view details

Leandro Ostera

commit sha 93ae8e046db7599cb8bd32e927db2d8e9006c000

Add CI badge to README

view details

Anton Bachin

commit sha 94c80edecf60016b5c0cc057f428e7c96b8bc371

README: adjust Travis badge Don't point to the latest build, because it might be from a broken PR or branch, and might not reflect the state of master or the badge. It also leaves people unfamiliar with Travis confused about navigation. [skip ci]

view details

Leandro Ostera

commit sha 84e1311867ee3fddd6a96e1489f4d3f7c1765e79

Begin new Odoc manuals (#203) This removes the old manual_usage and refurbishes the main manual of `odoc` to point to several smaller, more focused ones. It scaffolds manuals for: + System Integrations: where we can explain how it works with `dune`, `bsb`, `esy`, etc. + Internals: where we can dig digger into why are the internal representations the way they are and how they fit together at great length. + Using Odoc: where we can explain in tutorials how to make the best use of the features available for documenting interfaces, writing custom pages, and showcasing what we believe are good docs to get inspired by. + A high-level tutorial of how the generation works. --- It also includes a handy make target that will run in CI.

view details

Anton Bachin

commit sha ee44273e20d2dee9c3062baa6bffd81f79bfcbbc

Cherry-pick 1.2.0 changelog from previous-master [skip ci]

view details

Anton Bachin

commit sha 488e6677e11864793df7b85d72275ba686ce49f6

Changelog for 1.3.0 [skip ci]

view details

Anton Bachin

commit sha 3e1aa0450a53585a93a3336fb5d53e03f845c736

Initial roadmap Part of #210. [skip ci]

view details

Rizo Isrof

commit sha 7f4ba581b8936970c17d0474115817b039589984

Implement new heading parsing logic (#217) - Allow {1 ...} headings for sections. - Use {0 ...} for page titles. - Explain how documentation pages work. - Add Paragraph and Subparagraph headings (inspired by LaTeX).

view details

Rizo Isrof

commit sha 935c2115bd829237387378a13b5f0d53d4e9795a

Rename root-uri to xref-base-uri and fix empty string bug. (#223)

view details

push time in 19 days

pull request commentocaml/odoc

Improve xref2 tests

Thanks for pinging! BuckleScript dropped 4.02.3 and upgraded to 4.06.1 for quite a while now, so I think we are fine here 👍

Julow

comment created time in 20 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha 96e6b3a799e3f0e9d74664d37078c7b424eb366c

Small api refinements - Add apiVersion string - Add fromLang / toLang in successful print_parse result

view details

push time in 20 days

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 4ea5901cb5367a241424396b321442e3e79bb6aa

First Reason binding for the new bundle api

view details

push time in 20 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha 000aa0e5073ce8826aa79baec25c43d34316bcf2

Fine grained warning capturing for each compile - Captures detailed warning records on each warning - Reports warn_error on error_warn flags - Reports warnings on success result as well

view details

push time in 21 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha 67cf1c554ce84be8e2463ec46cfbaac129bcecc6

Add Sys_js bindings to jsoo_common

view details

Patrick Stapfer

commit sha d8821f804a9e244b35e7d67faf8d1c56f7b0dafe

Playground: Add warn_error flag, define more fine grained error types First try on making the bundle not output on stdout / stderr. Most super_error messages and the warning messages are printed into memory buffers now which allows us to forward the messages in the json payload instead. That's really huge, since we now have a better idea on how to get more fine grained data for our result json object results.

view details

push time in 21 days

pull request commentBuckleScript/bucklescript

Playground Res support / New BS JS API 2020

I took the chance and also expand the scope of this PR to tackle the new API as discussed in #4450.

The first commit to make the new API possible revolves around following changes:

  • Introduce a bs_platform namespace for all the functionality
  • Reduce the global state of the compiler to allow different settings per instance
  • Add configuration support to be able to manipulate the compiler setup
  • Make super_errors reporting the default

Introduce a bs_platform namespace

Before we were independently adding language support via window.reason, window.ocaml and window.napkin, etc. This behavior pollutes the global namespace, is harder to discover and could potentially cause override conflicts.

With one unified bs_platform object, we can now group together all necessary functionality.

Reduce global state / allow different settings

We wanted to introduce different settings for different instances of the bs_platform bundle API. The way the bundle was designed, the settings state was fully dependend on the global compiler state, meaning that in case we are using the bundle for things like multiple independent codesnippets within a documentation page, everytime we are setting the compilation setting for one snippet, it would automatically change it for all the snippets as well.

Therefore we needed to introduce a factory function that looks like this:

// load bs bundle globally via <script/> etc...
let bsc = bs_platform.make();

bsc.reason.setModuleType("es6");
bsc.reason.compile("let a = 1");

Internally, the API is still relying on one global compiler state, but we are now able to locally differentiate between different setting profiles by injecting a config record to each compile call.

Make super_errors reporting the default

Previously we offered functions like ocaml.compile and ocaml.compile_super_errors to switch between different reporting engines. Problem was, that once you called compile_super_errors, it would register the super_error reporters, and any further call with use_super_errors=false would not take any effect, since the super_error reporters would not be removed (in fact, there are no apis to clean up the changes of super_main.ml's setup function).

The goal is to make super_errors really solid, and it's probably the best default experience for our users anyways. So to circumvent this global state issue by managing error reporters, we just drop support for non super_errors behavior.

ryyppy

comment created time in 22 days

push eventryyppy/bucklescript

Patrick Stapfer

commit sha e1d434f5b54bcb67692a161fc5b68b026be7aa5f

Res -> Reason: try to sanitize ast nodes (not working yet)

view details

Patrick Stapfer

commit sha 0e309c6a5e568199b9942456dfbe5535a746ec6c

Playground: First major refactor of the BS JS bundle API This commit introduces a breaking change to reorganize the API as discussed in issue #4450. The change will revolve around following features: - Introduce a `bs_platform` namespace for all the functionality - Reduce the global state of the compiler to allow different settings per instance - Add configuration support to be able to manipulate the compiler setup - Make super_errors reporting the default **Introduce a bs_platform namespace** Before we were independently adding language support via `window.reason`, `window.ocaml` and `window.napkin`, etc. This behavior pollutes the global namespace, is harder to discover and could potentially cause override conflicts. With one unified `bs_platform` object, we can now group together all necessary functionality. **Reduce global state / allow different settings** We wanted to introduce different settings for different instances of the bs_platform bundle API. The way the bundle was designed, the settings state was fully dependend on the global compiler state, meaning that in case we are using the bundle for things like multiple independent codesnippets within a documentation page, everytime we are setting the compilation setting for one snippet, it would automatically change it for all the snippets as well. Therefore we needed to introduce a factory function that looks like this: ``` // load bs bundle globally via <script/> etc... let bsc = bs_platform.make(); bsc.reason.setModuleType("es6"); bsc.reason.compile("let a = 1"); ``` Internally, the API is still relying on one global compiler state, but we are now able to locally differentiate between different setting profiles by injecting a config record to each compile call. **Make super_errors reporting the default** Previously we offered functions like `ocaml.compile` and `ocaml.compile_super_errors` to switch between different reporting engines. Problem was, that once you called `compile_super_errors`, it would register the super_error reporters, and any further call with `use_super_errors=false` would not take any effect, since the super_error reporters would not be removed (in fact, there are no apis to clean up the changes of super_main.ml's setup function). The goal is to make super_errors really solid, and it's probably the best default experience for our users anyways. So to circumvent this global state issue by managing error reporters, we just drop support for non super_errors behavior.

view details

push time in 22 days

push eventreason-association/reasonml.org

Jailany

commit sha 8d0ae633f32a774f9e3ffca90bb7af1980d83f61

Fixed the typographical error in introduction page

view details

Patrick Stapfer

commit sha 95efc94af0749fd381560c9265c2868154231920

Merge pull request #220 from jailany/intro-page-typo Fixed the typographical error in introduction page

view details

push time in 23 days

PR merged reason-association/reasonml.org

Fixed the typographical error in introduction page

Fixed the typo and wording in documentation text of introduction page in the Reason isn't for you? section.

+1 -1

0 comment

1 changed file

jailany

pr closed time in 23 days

push eventreason-association/reasonml.org

Jailany

commit sha e7084d8659673aad3da74f14d40c62bb5444b942

Added command form dependency installation in new projects

view details

Patrick Stapfer

commit sha 7f7a1d9b547da4172087b5ed4d90e9fcf2407f09

Merge pull request #221 from jailany/install-dependencies Added command form dependency installation in new projects

view details

push time in 23 days

PR merged reason-association/reasonml.org

Added command form dependency installation in new projects

Added npm install in the compile and run section of the new project page.

+1 -0

0 comment

1 changed file

jailany

pr closed time in 23 days

fork ryyppy/linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

fork in 23 days

issue commentBuckleScript/syntax

Add line directive syntax support

@cristianoc there are two concrete cases:

  • playground: we need the directive to set the filename for error messages to values like reasonml.org/try
  • Markdown examples: We iterate through each code snippet and need to apply the correct line number (starting from the line number inside the markdown file), and again the original markdown file name.

I know that I can set the filename via the syntax apis, but not the line number.

Any other solution that doesn't involve directive parsing is fine to me as well

ryyppy

comment created time in 24 days

issue openedBuckleScript/syntax

Add file directive support

In OCaml, you can tell the compiler to set the linenumber / filename for any code like this:

# 20 "playground.ml"
let _ = 1 + 1

In the new BuckleScript syntax, this construct (# [linenum] "filename") doesn't exist.

Use case In reasonml.org, we test compile our code snippets. Since we are using the line preview mode for errors, we'd like to inject the corrected line number and the filename via the directive before we compile each snippet. Would be great to have that feature available for .res snippets as well.

Syntax I know that # is already reserved for poly-variants.. since this feature is not necessarily interesting for end users, i guess having less ergonomic syntax alternatives is okay as well

created time in 25 days

delete branch reason-association/reasonml.org

delete branch : blogpost-bs-811

delete time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 9029bf68e915972ac0079074491e023598764b27

Add blog post for BS 8.1.1 announcement

view details

Patrick Stapfer

commit sha 17297904a733ff35619e03aa6949933fdbaed066

Merge pull request #223 from reason-association/blogpost-bs-811 Add blog post for BS 8.1.1 announcement

view details

push time in a month

create barnchreason-association/reasonml.org

branch : blogpost-bs-811

created branch time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 6c268f954e1a537be901477002cca0080cb12643

Fix an issue with editor content synchronization More specifically, there was a bug where pressing the `format` button would not trigger a codemirror content sync, since the input value has not changed (it's not comparing the current editor value with the declaratively passed value)

view details

push time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha cf50b52bdef14d66f765a0305d98f90ae3776521

Add syntax switching / pretty printing feature This introduces a new concept of a `FinalResult`, that unifies a CompilationResult.t and ConvertionResult.t. This makes sure we are not getting out of sync with the error messages in the error pane. Also it makes it easier to separate between pure syntax parsing results and actual compilation results.

view details

push time in a month

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha 32358e5afcf31dd812b6b8b6cbf5411993d73fc3

Remove older versions from VERSIONS file

view details

push time in a month

push eventryyppy/bucklescript

Patrick Stapfer

commit sha e70862c6773cf7fe2aea93fde8dc858efbe5a34a

Expose parse_print / pretty print functionality

view details

push time in a month

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha b0a6ab64f2ba4954979d1abe46cabf899069e8f5

Add v8.2.0-dev.0 for testing purposes

view details

push time in a month

push eventryyppy/bucklescript

Hongbo Zhang

commit sha 160c89617efc8bdda1ff83161bfb927f7bbe254d

example commit of upgrading napkin

view details

Hongbo Zhang

commit sha 66a0e431a7340ad9f5bcbc0c1769864a5502dc16

not tracking napkin files here which is already done in the snapshot files

view details

Hongbo Zhang

commit sha a02d2375f5401ef0fa8aedf788d1527db3d12ed8

always re-config after build

view details

Hongbo Zhang

commit sha e310ec919ac419edf2f499a331ed403505d8ef34

Merge pull request #4510 from BuckleScript/try_bump_napkin example commit of bumping napkin, not trakcing napking any more in our directory

view details

Hongbo Zhang

commit sha be70ce60b4db5394e12957001b08779a3d8a9686

Add a state variable to indicate we are parsing res files

view details

Hongbo Zhang

commit sha 63b6ad674dff14e45425383d696bf881bbec940f

remove the spellcheck bolierplate, add a hint for missing `type rec` in napkin

view details

Hongbo Zhang

commit sha dd0ed9b9500cc68b178d6a6d0f31616fcd6539c7

snapshot

view details

Hongbo Zhang

commit sha f2fab882f8e57c3b582873a4b3c9bb9a22f09f24

avoid open

view details

Hongbo Zhang

commit sha a19ae5852cd0efb2860c8456a614d84bd67c610f

snapshot

view details

Hongbo Zhang

commit sha 0ac8f14a30695302bb4962b6a6716d6dbe7f31a2

Merge pull request #4512 from BuckleScript/better_error_message hint people that they may forget rec after type for res users

view details

Hongbo Zhang

commit sha 30ec0366b293ab8431b16841c99954ab82ad7cf6

tweak

view details

Hongbo Zhang

commit sha 2b0e093b4bdd0a451c0672980238e37674bccb69

tweak, remove unused code

view details

Hongbo Zhang

commit sha 8b4c4d5b1d4a9ca8c7182ac2d11c147c77aeec3b

remove unused code

view details

Hongbo Zhang

commit sha dbc3b8d98435c8d800f8ceea2f163f5ecf36e97d

snapshot

view details

Hongbo Zhang

commit sha 823c83e34fd6ba4e58f782047d291f4e8f8f6145

tweak

view details

Cheng Lou

commit sha 9f49814dd0c4b53d5cbf7f3d890744db60262fdc

Tweak wording of #4512

view details

Hongbo Zhang

commit sha 836ec9196d6df5afdc873b15b5744b95f29d7917

more readable code

view details

Hongbo Zhang

commit sha a4cced2351da95e3ae97f877125ded951e0b9b65

snapshot

view details

Hongbo Zhang

commit sha 8e5b9685795c3f00e20c0154f0662de3ff034193

readable code

view details

Hongbo Zhang

commit sha 20381e2d9fcdac93f84f0ea32b14cccd667d1e86

memory efficient split

view details

push time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 202c6d1f75449e2ef498a3f72af6b994dc509d23

Remove js.logs

view details

push time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha f31cd3040a8d291983813294d91c1dcdb089fe7b

Convert AnsiTerminal component to AnsiPre component for easier style handling

view details

push time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha 3aae4004a4a64274bb3f98c6b28796f995e3733e

Fix Ansi tokenizer where last char is not being scanned

view details

Patrick Stapfer

commit sha 7220a2793944c49ffa1c252bd67e508d0df8daf7

Add lineWrapping option for code-mirror component

view details

Patrick Stapfer

commit sha 0d119ced3c5d462506f1ea0785b9793ab910ed4c

Add temporary red background to ansi terminal lines

view details

Patrick Stapfer

commit sha 925676222456c297a2112d30914c968d7be14953

Add support for multiple compile error messages

view details

push time in a month

push eventryyppy/bucklescript

Patrick Stapfer

commit sha 7c4c512b48484a58d4097309c14016b8148b3e6e

Playground: Split error reporting to fullMsg / text Uses the new syntax' diagnostics apis to extract a full error message, with all the context, and a simple text message with the explain message. Also removes the arbitrary line / col string concatenation in js_error_msg, since it's mostly redundant.

view details

push time in a month

PR opened BuckleScript/syntax

Expose Napkin_diagnostic's toString and explain function

Exposes the Diagnostic toString and explain function as public API.

Why?

  1. The playground needs a way to transform a single Diagnostic.t into a pretty report string (right now I can only stringify a list of Diagnostic.t with stringOfReport)
  2. The playground needs a small msg string for hover message display (basically only the thing explain returns)
+3 -0

0 comment

1 changed file

pr created time in a month

create barnchryyppy/syntax

branch : expose-diagnostics-string-functions

created branch time in a month

push eventryyppy/bs-platform-js-releases

Patrick Stapfer

commit sha 0fcd67433bfc2b28cf1ef3013f5df0661092ce74

Remove unwanted compile artifacts

view details

Patrick Stapfer

commit sha 3bdbaad41102255b4baf607ff4ada04f877d9f2a

Update gitignore

view details

Patrick Stapfer

commit sha 0dd5f471424f0138b18a0d66a77e602fc95f3fb3

Add v8.1.0-dev.1

view details

push time in a month

push eventryyppy/syntax

Patrick Stapfer

commit sha 1207083e5ab47b9de6d137442cde3ed45f9ca822

Add functions accessing diagnostics startPos / endPos

view details

Iwan

commit sha 52b5fc271001ca38c9b67d829688ef960ed69f8c

Merge pull request #33 from ryyppy/get-diagnostics-location Add functions accessing diagnostics startPos / endPos

view details

Cristiano Calcagno

commit sha 30083b6a93ce6f5b532426570a2f7ff5da1b9e00

Document currently untested API bits for diagnostics.

view details

Cristiano Calcagno

commit sha 8936885aa8972f7d5728ef483ad729f337f82594

Update napkin_diagnostics.mli

view details

Cristiano Calcagno

commit sha bd30d6f0b322416f78eab352c40cabea4ed62ceb

Make parsing benchmark fail in case of parse error.

view details

push time in a month

issue openedBuckleScript/syntax

[Error reporting] Weird error position when switch is missing a value

Given

Given following malformed snippet

let ret = [1, 2, 3]

switch {
  | [a] => Js.log(a)
  | rest => Js.log(rest)
}

Reports following error:

Line 4, 7:
  
File "playground.res", line 4, characters 7-10:

2 │  
3 │  switch  {
4 │    | [a] => Js.log(a)          
             ^
5 │    | rest => Js.log(rest)
6 │  }

Did you forget a `}` here? 

Expected

The error parser should point to the position right after the switch, before the braces:

2 │  
3 │  switch  ___  {
                     ^
4 │    | [a] => Js.log(a)          
5 │    | rest => Js.l

created time in a month

create barnchryyppy/bucklescript

branch : playground-napkin-support

created branch time in a month

push eventreason-association/reasonml.org

Patrick Stapfer

commit sha a7309f0baa7c4dba6966b5ea9d58beecbd867299

Disable js.log

view details

Patrick Stapfer

commit sha c2a5adc1bf31f015724275e073f7e4113e91a946

Introduce changes for 8.2 playground bundle support

view details

push time in a month

PR opened BuckleScript/bucklescript

Playground napkin support

Important: Requires latest syntax version to be merged first, because of missing Diagnostics API functions

+166 -23

0 comment

5 changed files

pr created time in a month

more