Open
Conversation
🦋 Changeset detectedLatest commit: 565274c The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
❌ Deploy Preview for publicodes-website failed.
|
@publicodes/cli
@publicodes/codemod
publicodes
@publicodes/forms
@publicodes/react-ui
@publicodes/rest-api
@publicodes/runtime
@publicodes/tools
commit: |
b9020b1 to
a8a76f5
Compare
d6e12cb to
4093e3c
Compare
* feat(compiler): naive compilation to javascript * feat(compiler): iterate on js compilation * feat(compiler): generate .d.ts files * feat(compiler): start to implement a runtime + add cache layer to the js engine * feat(compiler): benchmark with first minimal runtime * fix(compiler): correctly manage contexte and constants * feat(compiler): allows to compile to js or json + start to debug the JS backend * feat(runtime): allow to run tests with compiled to js code * refactor(runtime): use public getters on outputs data * fix(compiler): use the neq runtime and start to fix the ternary conditionnal * fix(compiler): fix the js runtime semantic + add dune rule to embed js file in ocaml module * fix(compiler): use default output file according the output type extension * fix(compiler): fix the JS runtime round() function to have the correct precision * fix(runtime): refactor tests * fix(runtime): add the bun in dev deps * fix(runtime): update auto-entrepreneur benchmark - Everything is recompiled before running benchmark. - Add support to the JS compiled engine. - Check return values with assert in the benchmark to track regression (note: the legacy engine doesn't return the same results as the new ones, is it wanted?) * refactor(runtime): remove unused benchmark file * fix(compiler): start to fix parameters problem in JS compilation And add dedicated test in the runtime specs to track regressions * fix(compiler): remove artefacts * feat(compiler): correctly handle needed/missing parameters with context in the JS compilation * fix(compiler): correctly escape " from constant * fix(compiler): correctly manage floor and ceiling tranformation * fix(compiler): correctly manage lazy operators on null values * feat(runtime): add more test for paramters * feat(compiler): try a compilation to pure JS functions * feat(runtime): improve the parameters handling -> better perfs * fix(compiler): correctly manage ref in the JSON output * fix(compiler): correctly parse emtpy string + add test for `par défaut` mechanism * fix(compiler): correctly handle 'toutes ces conditions' with only one arguement * fix(compiler): prefixes with $ runtime function to avoid name collision * feat(compiler): expriment with js optim * feat(compiler): export JS rules in a dedicated object * feat(compiler): add cache for refs in the JS runtime * feat(compiler): add missing JSDoc types in the javascript runtime * refactor(compiler): add comment to the optim module * feat(compiler): generates JSDoc types * refactor(compiler): remove the JSON output as we only compile to JS now * refactor(compiler): move To_hash as Tree.Hash + add some .mli files * Add test and improve generated JS (#782) * test: add test for context mechanism * test: repare test for arrondi * test: arrondi et applicable si * test: applicable si / non applicable si / plafond / plancher * test: par défaut * test: add date * feat: improve generated JS 1. Change rule signature to an object containing « evaluate » function This allows to add other meta (title, type, unit, description, etc) at the same place of the rule, and simplifies the API. 2. Improve generated JSDoc Use proper typing for param object 3. Add / update test Add some test, and update the previous ones * fix: date equality comparison * feat: fix js output * fix: equality implementation * test: add test for equality * feat: add global cache and cleaning * fix(compiler): avoid conflits with javascript identifiers * refactor(compiler): use Pp instead of sprintf for the to_js module * remove @publicodes/runtime package - Move test and benchmark to compiler - Create separate JS private package for each of theù * fix JSDoc generation * fix tests --------- Co-authored-by: Emile Rolley <emile.rolley@tuta.io>
direnv is good and safe enough to use
The model has been renamed to missing_terme.publicodes, breaking this test.
This one was just needing a promote?
Now I think the trailing "-" is the error. The stdout ends with a stdin error, and the CI fails harder. Remove this.
Currently the tests are not re-run on binary change. This dependency on the built binary was only used for this directory. Using :whole_subtree make it recursive.
Odoc only build documentation for public libraries. We have to specify public_name for odoc to consider them.
This add a -c command argument to pass a config file path. This allow the user to specify multiple compilation targets. A default value "publicodes.yaml" is used when absent. If both inputs files, and config file are given by the user, the config file is ignored. Currently the watch mode is not supported when building multiple targets. An error message is displayed to the user for now. The yaml format is simple, and specify the build targets: targets: - output: test.js.local inputs: - test.publicodes.local type: js default_to_public: false All fields are checked, and a corresponding error message is build to the notice the user on invalid format. Ex: Error: Parsing config: "targets" field error: "inputs" field error: Expected a string value Co-authored-by: Emile Rolley <emile.rolley@tuta.io>
The init subcommand generate and write a default configuration file. Co-authored-by: Emile Rolley <emile.rolley@tuta.io>
Remove a trailing whitespace, and missing EOL at EOF, remove empty line on empty jsdoc_typedef.
Instead of using pretty printers, we use a templating system named Jingo. jingo: https://github.com/tategakibunko/jingoo To achive this, we first build a dedicated model tree for Jingoo. This tree is language agnostic, and represent primitives for the templating system. This split the work between formattable preparation, and language output structuring (hopefully simplifying both). The goal is to make the second part, the languages templates, more easy to write and alter.
This catch error branch match on SyntaxError, meaning after "compiled" is generated. We can assert it is a string here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Soon...
👉 Voir l'avancement : Publicodes 2