Socket
Socket
Sign inDemoInstall

bs-platform

Package Overview
Dependencies
0
Maintainers
1
Versions
205
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bs-platform

ReScript compiler, OCaml standard libary by ReScript and its required runtime support


Version published
Weekly downloads
3.5K
decreased by-17.87%
Maintainers
1
Install size
142 MB
Created
Weekly downloads
 

Changelog

Source

8.3.1

This is a minor bug fix release for 8.3.0

  • capture warnings when rebuild without enforce warn-as-error
  • #4716 internal, make ninja a submodule in dev process
  • #4722 better dataflow for cases like let {a;b} as obj = ...
  • no need call caml_enter_blocking_section for single threaded compiler
  • #4739 fix the interaction of exotic filenames like [id] with the build system.

8.3

  • #4694, #4712 improving/customizing the underlying ninja build system, better performance

  • #4681, #4710 creating persistent lib/bs.compiler.log per each build for editor diagnostics

  • #4688, #4707 better error message

    • #4702 remove nativeint module which is not meaningful on js platform
  • #4701 support both bs.val and val attributes, in the future to recommend the shorter ones

  • #4693 Fix the compiler runtime issue, always flush err_formatter when at_exit

  • #4687, #4689, #4691 allow user to customize js file extension in bsconfig.json (checkout the schema )

  • #4685, #4624, #4690 allow more character set in filenames to make rescript play better with react native and next.js

  • #4684 fix the raise of Sys.is_directory, make bsb works better with Emacs temp files

  • #4679 better error message for nonrec GADT

  • #4671, #4678 better strategies to remove stale output for the build system

  • #4676 (internal) add Config.syntax_kind so that some changes in super_errors can be made upstream

  • #4650, #4656, #4657, #4662 always warn-as-error while not degrading user expereince (with the help of build system)

  • #4661 (internal) not depending on upstream compenv module

  • #4639, #4642 refined static analysis to generate better code

  • #4636, #4641 es6 default import support

  • #4638 clean up the confusing error message over uncurry label

  • #4637 remove unneeded mention of BuckleScript in uncurried message

  • #4623 better data flow inference for common pattern: let {a,b,c} = ...

  • #4622 add html element & observer phantom types

  • #4618 fix combination of bs.obj with bs.as so that bs.as can carry more kinds of playload

  • #4613 (internal) pass down @inlined attribute from upstream. (the info is passed down, how to make use of it is not done yet)

  • #4609 Lift the restriction that user can only define a type with less than 256 constructors

  • #4606, #3961 (internal) use is_a_functor from upstream instead of guessing

  • #4605 (experimental) take @@inline attribute into consideration for functions

  • #4604 enhance Random module

  • #4600, #4599 fix missing bounds checking for Bytes.set

  • #4597 fix Js.Array and Js.Array2 the wrong return type for from method

  • #4513 better error message when interface/implementation mismatches (done in commit db485f1)

8.2

  • bsc -fmt myFile now changed to bsc -format myFile

  • #4573, #4565, #4559, #4558, #4556, #4554, #4553, #4550 introudce string literal types

  • #4580 #4581, #4582, #4463, #4583 relax bs.as to allow object literals instead of json, so FFI below is allowed:

    external fff0 : int -> int -> (_[@bs.as {json|[undefined,undefined]|json}]) -> int = "say"
    [@@bs.val]
    
    let testUndefined () =
      fff0 1 2
    
  • #4570 refine purity analysis so that object literals in raw will be considered pure

  • #4548 #4555 fix ghost locaption in empty array

  • #4540 optimize code generation for recursive modules

  • #4530 internal -color option default to always

  • #4569 emit a warning for use of ( [ `a| `b] [@bs.string]) since it is no longer needed

  • #4531 better generated js code for belt

  • #4526 add bsc -fmt file option, format into the new syntax

  • #4495 enable newish es syntax in raw

  • #4491, #4492, #4493 fix a bug when printing a single object literal as statement, optimize this case into a nop

  • #4482, #4480 disable user to redefine unit, true, false

  • #4474 #4465 [reactjs] add support for ref argument inside of React.forwardRef type applciations

  • #4473 adding an experimental new syntax

  • #4470 tweak error message for not found record fields/constructors

  • bug fixes
  • #4572, #4585 fix a corner case for ffi to allow such bindings:
    external get : _ -> _ -> _ = "" [@@bs.get_index]
    
  • #4589 fix building failure on freebsd
  • #4524, #4519 fix an inlining bug
  • #4505 #4502, fix bad error message in bsb -bla
  • internal
  • #4497 #4507, #4516 compiler performance improvement

8.0

  • Code generation
  • #4308,#4309, #4397 #4403 #4404 #4409 variant as objects

    A (0,1)
    

    now is

    { TAG : /*A*/0, _0 : 0, _1:1 }
    
  • #4399 remove magics in Belt.List to prepare new data representations

  • #4405 polyvar as objects

    A 1
    

    now is

    {HASH:MAGIC_NUMBER, VAL:1}
    
  • #4331,#4332 #4337,#4339, #4338, #4337 Encoding exception as dictionary, add stacktrace support

  • #4322, #4325,#4326, #4364, #4383, #4371 lazy values as objects, make caml_update_dummy generalized

  • #4456, #4458 optimize String.make

  • #4447, #4442 improve arity inference over raw named function expression

  • #4413 changed internal encoding of Some ((Some .. None)), not relying on physiclal equivalence, friendlier to serialization

  • #4379 make bs.config take effect ASAP, however, it can not happen befor parsing. This meangs, it won't have effect over flags like -bs-D when it happens in lexing.

  • #4426, #4428 apply bs.inline to float literals

  • #4378 apply bs.inline to int64, proper error for not supported types

  • #4425 optimize bs.as "0" to allow users to turn record representation into array when needed

  • #4407, #4423 Fix compatiblity layer between debug mode and none-debug mode

    • For exmaple, A (1,2) are equal for code generated either in debug or non-debug mode
  • #4422 remove Unix module from stdlib

  • #4421 special encode list as {hd : v0, tl : ...}

  • #4420 remove legacy jsx v2

  • #4390 less parens for bs.as json literals

  • #4245, #4385 breaking changes: enable strict-sequence, strict-formats by default

  • #4304, #4293 better code generated for string interpolation

  • Fix
  • #4451, #4454 fix imprecise locations over pipe
  • #4442 fix gentypeconfig.language parsing
  • #4430 when cleaning generated files, use langauge from gentypeconfig
  • #4324 fix react-hooks theme name field
  • Libs
  • #4443 provide a best effort generic seralization mechanism
  • #4427 better error message for non-existing module in sources[n].public
  • #4414, #4419 better error message for cases like below
    Error: This expression should not be a function, the expected type is
    (int bounce -> 'a bounce [@bs])
    
  • #4416 fix typo (unrecognized primitive -> unrecognized primitive)
  • #4408 [playground] fix jsoo_refmt_main, remove load_modules (uneeded)
  • #4395 fix jsoo_refmt_main, delete playground folder
  • #4394 repl.js: add dev mode
  • #4393 Playground: bring back load_modules API
  • #4389 React JSX ppx: better error message for missing labels
  • #4388 [jsx] fix unused pattern warnings
  • #4380 [jsx] remove bs.config handling in jsx ppx, use bs.config.flags instead
  • #4376 remove Math.imul polyfill, inline Math.imul
  • #4370 remove deprecated support for fun%raw
  • #3845, #4367 fix output too many parens for callback
  • #4359 [jsx] rais error if creating react.component with unnamed argument
  • #4364 remove customised formatter for exceptions
  • #4358 change reasonreact version for templates
  • #4351 force binding location on the actual make binding
  • Internal tools/refactoring
  • #4460 bspack is a stand alone file not relying on c stubs
  • #4459 bsb customized command line parsing, prettier output over bsb -h
  • #4455 simplify bsb_helper command line parsing
  • #4458 clean up lexing runtime, stay close to lexing.c
  • #4441 remove unused Obj.set_tag
  • #4438 tweak post-processing after linking, better constant substitution
  • #4429 #4431 #4435 minor breaking changes
    • more compatct encoding of .bsbuild
    • flatten dev gropus
    • for files in dev directory they can refer each other
  • #4402 move caml_set_oo_id into caml_oo module
  • #4392 remove unused return_exp in J.ml ast
  • #4387 fix a build bug when no mli provided, add reason-react for testing
  • #4366, #4373 update polymoprhic comparison not relying for lazy values
  • #4372 vendor jsoo byte code, build playground on the fly
  • #4354 bstracing -all can handle multiple build sessions

Readme

Source

ReScript

The compiler for ReScript.

npm version Build Status

Documentation

Please see the documentation site.

Contributing

See CONTRIBUTING.md.

Acknowledgments

  • Thanks to the OCaml team, obviously, without such a beautiful yet practical language, this backend would not exist
  • Thanks to ninja-build, ReScript also comes with a blazing fast build tool on top of it, ninja is a truly well engineered scalable build tool
  • Thanks to Bloomberg and Facebook. This project began at Bloomberg and was published in 2016; without the support of Bloomberg, it would not have happened. This project's funded by Facebook since July/2017

Roadmap

Licensing

See COPYING and COPYING.LESSER

The ocaml directory contains the official OCaml compiler (version 4.06.1). Refer to its copyright and license notices for information about its licensing.

The vendor/ninja.tar.gz contains the vendored ninja. Refer to its copyright and license notices for information about its licensing.

ReScript builds on parts of js_of_ocaml:

ReScript builds on parts of OCaml:

These modules were adapted from ocaml/bytecomp/simplif.ml for JavaScript specific optimization purposes.

jscomp/main/js_main.ml is adapted from ocaml/driver/main.ml. It is the main entry point of the underlying compiler.

jscomp/stdlib-* is copied from ocaml/stdlib. It is compiled to JavaScript and included with ReScript.

jscomp/test is based on ocaml/testsuite.

ReScript unit test builds on parts of OUnit

  • jscomp/ounit is adapted from ounit, the unit test utilities are only used for dev purpose, they are not required for distribution

Keywords

FAQs

Last updated on 09 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc