Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Autocomplete picks up module open inside line comments //. #15

Closed
bsansouci opened this issue Nov 19, 2020 · 7 comments
Closed

Autocomplete picks up module open inside line comments //. #15

bsansouci opened this issue Nov 19, 2020 · 7 comments

Comments

@bsansouci
Copy link

I've added module String = Js.String2 at the top of my file of common stuff a really long time ago, and the autocomplete isn't picking up on it. It's still giving me the functions inside the stdlib String module.

@cristianoc
Copy link
Contributor

cristianoc commented Nov 20, 2020

Seems to work for me, at least when tried on a standalone file.
Maybe this and other issues can investigated when the rescript-vscode extension with rescript-editor-support is released.
In general, the assumption is that everything has been built (typically there's a watcher).
Then autocomplete uses the information from the current build, plus the current file being edited.
So the file last saved must compile successfully (for module String = Js.String2 to be picked up), and the edit since saving would contain something like String..

So:

  1. module String = Js.String2
  2. save and build (or use a watcher)
  3. edit String.
    Then autocomplete should work as expected.

@cristianoc
Copy link
Contributor

Closing as does not repro easily at the moment. Can be reopened with a new repro bases on latest release.

@bsansouci
Copy link
Author

Hey, sorry for the silence, iOS work became high priority for a bit!
So I upgraded to 1.0.4, and I'm still having this issue.

Here are some steps I can use to repro every time. Before anything, you need to have your own module with module Array = { include Js.Array2; } (mine is called Common.res)

In a new file I just write this, and get the correct autocomplete:
Screen Shot 2021-01-08 at 08 40 39

Then I open Common and get the correct autocomplete:
Screen Shot 2021-01-08 at 08 40 59

But then the craziest thing happens, if I comment out open Common I still get the old autocomplete no matter what I do (I can restart vscode, and will get the same persistent issue).
Screen Shot 2021-01-08 at 08 49 32

Then I remove that commented out line, and everything goes back to normal.
Screen Shot 2021-01-08 at 08 51 02

Another, probably separate, issue that took me a while to track down is the following (small note, my code compiles and behaves correctly here, only autocomplete is having issues).
I have this function, parsing JSON and getting an object back. If I annotate data with anything (here string), I get correct autocomplete.
Screen Shot 2021-01-08 at 09 09 00

But if I annotate it with a generic 'a, I get incorrect autocomplete from that point in the code and below (within the same scope).
Screen Shot 2021-01-08 at 09 12 24

I think I did something along these lines, at the top level scope, which is why I'm getting issues at times. I'll work on removing these 'a, but since this all compiles fine I'm surprised that these runtime cast throw off the autocomplete.

@cristianoc cristianoc changed the title Autocomplete for module String doesn't use the one locally opened in the file Autocomplete picks up module open inside line comments //. Jan 9, 2021
@cristianoc
Copy link
Contributor

cristianoc commented Jan 9, 2021

Here's what's going on. Autocomplete parses the source file simplistically backwards to look for open's. There's some logic to exclude /* stuff */ comments, but apparently not for line comments like:

// open Belt
List.

@cristianoc cristianoc reopened this Jan 9, 2021
cristianoc added a commit that referenced this issue Jan 14, 2021
@cristianoc
Copy link
Contributor

For the second issue, it looks like single quotes are interpreted as string terminators, so 'a is interpreted as an unterminated string.

@bsansouci
Copy link
Author

Thanks for fixing! Super appreciate it :)

@cristianoc
Copy link
Contributor

@bsansouci thank you for digging in and figuring out how to repro these corner cases.

cristianoc added a commit to rescript-lang/rescript-vscode that referenced this issue Feb 3, 2021
Sync to commit rescript-lang/rescript-editor-support@6bdd10f

Changes since the last sync:- Add support for doc strings when hovering on modules.
- Add support for printing uncurried function types in hover.
- Fix autocomplete issue where `open Foo` would be picked up inside line comments (see rescript-lang/rescript-editor-support#15).
- Don't print parens as in `A()` for 0-ary variants.
- Fix infinite loop in autocomplete that can cause `rescript-editor-support.exe` processes to use up 100% cpu.
- Fix jump to type definition for types defined in an inner module.
chenglou pushed a commit to rescript-lang/rescript-vscode that referenced this issue Feb 3, 2021
Sync to commit rescript-lang/rescript-editor-support@6bdd10f

Changes since the last sync:- Add support for doc strings when hovering on modules.
- Add support for printing uncurried function types in hover.
- Fix autocomplete issue where `open Foo` would be picked up inside line comments (see rescript-lang/rescript-editor-support#15).
- Don't print parens as in `A()` for 0-ary variants.
- Fix infinite loop in autocomplete that can cause `rescript-editor-support.exe` processes to use up 100% cpu.
- Fix jump to type definition for types defined in an inner module.
chenglou pushed a commit to chenglou/rescript-editor-support that referenced this issue Apr 24, 2021
getting a little something going

work it good. got the start of completion going

the most basic completion support

parsing documentation, got topmodule completion working

getting ready for mre completion

ups

wheee we have completion of module items

lets convert ocamldoc to markdown

add in things

small fix

some cleanup

add a vscode client package

add an example project

readmes

add a command to restart the server

yay auto-restart of reason language server

add contributing info

solid caching! with dirty checking of .cmts. also dont complete for current module name

boom, completion with opens

open pervasives

head start on hover! can get types of expressions n stuff

as you type type errors

use flags from merlin file to pick up ppx stuffs

umm working on hover n stuff

going after definition & references

ok, jump to definition works within a file

more docs

refmt

yayy cross-file stuff

compile documents on open

jump to definition in an ocaml file!!! The locations are off for some reason, probably due to transforms?

yay codelens. also uri display on completion items

fix jump to definition for stdlib stuff

use full path for local sources

range formatting, super fun

format whole document

starting on in-file completions

much more stable code lenses

codelens for opens "exposing"

trying to get modue aliases working.. .

yay belt alias autocomplete works

make displayed completion uri relative to root

update rex-json version

some cleanup

highlight local references

complex local rename now working

moving some things

trying various configurations

clearing

lol moving it back

refactor

lots of fixes for real world projects

heres an example native project

ok, finally have native compilation doing ok

ok, I think I have things sorted out better

oops add in the .vscode directories

set log location

put compiler artifacts in the cache location

track number of uses an open got

track location of uses

list external dependencies

working toward cross-file rename

cross-file-rename

fix

packaging

fix directory

Just a small readme update to include instructions to build the example project

Updating client/package-lock.json to be in sync with package.json

a refmt, and resolving definition of "open"s

show local references

cross-file references

check it out

bring back opens

move things

working on constructor, attribute completions

better completions for constructors and attributes

jump to constructor

cross-file jump to definition of attribute / constructor

cleanup

yess find references for attribute names

allow the definitions to be selectable for attributes and constructors

exclude the current item from "find references"

add comparison to ocaml-language-server

Update Readme.md

Update Readme.md

fix size of constructor/attribute locations

rename attributes & constructors!!!

better packaging, dont ship the binary

list document symbols!!!

better error messages

rearrange a bunch of things

get settings to work

generic id param

Revert "generic id param"

This reverts commit bb15188.

Use the raw Json value for message ids.

The spec allows ids to be either Number or String. Since the server simply
carries this value around so that it can submit it with the response, the
simplest solution seems to be to pass the Json type through unexamined and send
it right back to the client.

Thanks to the magic of type inference, the change is isolated and nearly
trivial.

Support windows 👏🎉😎💰 (rescript-lang#8)

It was relatively pain-free, I must say. Pretty much the only thing I had to mess with were path handling logic.

fix handling of files that haven't been opened

rebuild windows

add macos binary

rebuild mac

woops, fix macos

fixed macos deal

Fix capabilities reporting. (rescript-lang#15)

signatureHelpProvider and codeLensProvider must return sub-objects which detail
their capabilities, not just "t".

Do not serve markdown if not supported (rescript-lang#14)

Support a stdlib that doesn't contain sources

This will be more robust, though it's a bit more complicated. Could
probably do with a refactor.

show hover documentation, even for things without source files

cleanup

include stdlib when compiling as you type

lots of cleanup, some initial fixture tests

show a nice error message if you havent run bsb yet. fixes rescript-lang#13

install things

 Improve support for serving plain text (rescript-lang#28)

* Improve support for serving plain text

* Extract converter logic out

This also makes conversion a no-op if usePlainText is false and the source is markdown.

lol typo

Initial reason jsx support

Turns out the ppx flags needed to come before the  `impl` argument.

get it somewhat working for reason-react

process dependencies correctly

fix local file resolution

rebuild

Update issue templates

Readme adjustments (rescript-lang#32)

* Minor typo

* ‘npm build’ doesn’t work

json up

ok work with cmi too

cmi stuff seems to work pretty well

fix module type processing

little refactor

resolve aliases for completions better

bunch of autocomplete fixes, including locally defined modules

get local functors working

remove weird nil render

rebuild for new beta

fix for bs 3.1.5

Use platform helper for getting temporary directory (rescript-lang#36)

trying a recovering parser

fix native belt stuffs

get working on linux!

strip the location info from type errors

Avoid revealing output channel for errors from language server (rescript-lang#40)

fix for older bsb native

first step toward jbuilder!!

add package info everywhere

have packages more

lets try some ppx maybe

try using the ppx

a doc

use ppx more

more

cleaning up more

yassss we hove hover-for-explanation on ppxs. the best

some more explanations

it.. seems to work? I think that was the hardest part. now to try it with two packages in a monorepo

ok, monorepo setup is go!

more and better

more getting ready for dune

a refmt

add a monorepo example

getting rid of some more node_modules

some codelens settings

fix stdlib loading n stuff

jbuild file parser yeah

closing in on esy + jbuilder

arghhh so close here. but the ocaml version is wrong

jbuilder working!! kinda

basic auto-open

woops

some refactorz

workin toward better jbuilder setup

cross-alias definition finding!

fix stdlib for jbuilder

support for adjacent libraries in jbuilder

more jbuilder stuff, also add circle config

ooh fix compilation. sweet

version up

cleanup

fix the rename issue

fix warning reporting

fix syntax error location reporting

gearing up for completing attribute names

better path resolution incoming

yasss got attribute resolution at least a bit

working on better completion

refactor to use a record for docs

undo comment out

starting to unify

working on testing

yay some tests!!

wip developing tests

completion tests lookin good

rebuild

renames

thinking about syntax errors

more completion tests

diff log location

quieter output

call it path

testing definition fetching

some more tests

thinking about renames

test includes

working on better attribute tracking

use attribute pos

more attribute pos stuff

working on type exports

making it all new

ok I think this will work for references?

getting some reference tests working

constructors

diff format

wip getting references

CP: add a format width option

fix compilation

workin on it

basic cross-module working

sweet, cross-file attributes and constructors are ok

you win some, you break some

fix that one

mores

one more fix

ok, reference tests passing

processing cmt modules and stuff

wow, ok I guess modules are doing ok

functor arguments are, um, maybe working?

yay fields

track extent

refactorz

use new process in docs thing

bring in the extra processing.

result ppx

definitions are going on the new style!

refactor

lets get documenthighlight going

fix missing constructor handling

working on moving references to new system

exclude current

sweeet references are working

move more things over, and better error reporting, and partial cmt support

get me some hoverin

digging into some hover stuff

rm old stuff

symbols on the new gig

working on tracking opens

some add uses

ok folks, some opens are working

ok, trying open codelens

getting better about opens

ok open tracking feels good

gonna tackle completion

type error

working on completions

hrmmm working on completions, not quite there yet

ok folks, completions looking not too bad

ok folks, were tearing it all out

removed a ton more things

ok, clean up some more things

working on completions

ok includes

taking a whack at attribute completion. and so tracking variable scopes

hmm closer to attribute completion

sweeet basic attributes working

ok more attributes working

ok attributes maybe mostly working

rockin it up

lots of completion cleanup

muuch more stable codelens

rm unused

working on better module resolution

ok folks, local completions working much better

experimenting

cleanup

sweet, cross-file as you type!

cross-file as-you-type my good folks!

ok, theres some more work to do to nail this down completely, but I like where its at

making the readme ##contributing section true to life again (rescript-lang#60)

Add node module resolver to fix missing bsb bin in hoisted projects (rescript-lang#59)

fixes rescript-lang#58

Improve rangeFormatting (rescript-lang#61)

* Improve rangeFormatting

Preserve leading and trailing newlines
Preserve original indents

* Remove testing

run tests

verify that workspaces are working

rebuilds

fix syntax error

cleanup, get definition tests going again

more tests cleanup

npm test better

tests for open codelens

fix cmi locs, fallback to top of file when needed

fix rescript-lang#64 - allow analysis of dependencies

fix windows uri parsing

working on windows again. fixes rescript-lang#69

support es6 compilation mode. fixes rescript-lang#68

fix rescript-lang#63

fix bsb-native again

maybe better inter-file invalidation

fix tests

cross-file-as-you-type default to false

Fix format on paste

Update MessageHandlers.re

Update test command (rescript-lang#74)

Update MessageHandlers to use Belt fully Any opinion? (rescript-lang#75)

* Update test command

* Update MessageHandlers to use Belt fully

Any opinion?

working on supporting my lispy syntax

better namespacing

fix

trying a reason lisp syntax definition

ok separate syntax highlighting for reason-lisp is working! now threading it through the language server

lookin ok

fixes for reason-lisp

cleanup

better error messages, and block comments

rebuild

rebuild

Update Readme.md

Update Readme.md

Update Readme.md

better release setup, some bugfixes

recompile on save, also fix settings parsing

support interfaces

fixing a bunch of things. definition of longidents as well

initial signatureHelp support!!

cleanups

trying no-cmts out

less logz

yes we have auto-reloading when .merlin files or bsconfig.json files change!

fix rescript-lang#12 - better cross-file go to type definition

Update issue templates

yesss, fixed the module-alias-namespaced issue

Create Changelog.md

fix pattern processing bug

sweet that fixed the other issues too

new release

handle preprocessing errors such that no cmt is generated in asyoutype

change working directory before running bsc for ppxs

fix es6 js output directory

better

Update Readme.md

ocaml syntax add

add ocaml syntax support../..

fix error messages. fixes rescript-lang#65

Read dune files in addition to jbuild files (rescript-lang#82)

* Read dune files in addition to jbuild files

* Add example esy dune project

* Add esy-dune-project to vscode launch config

* Update esy.lock.json

* ship .vscode settings in dune example

fix rescript-lang#83

ignore missing dep in search path errors

fix error position reporting

Deduplicate values from opens (rescript-lang#86)

run bsb from with reason-language-server!

rm no-color

wat

wheee jbuilder run-on-save now working as well!

fix include order

move vscode plugin to a better place

Update package.json

merge

add screenshot

Also load bs-dev-dependencies (rescript-lang#92)

Tested by adding bs-jest to the react example and confirming that
completion and hover work properly in a module in a directory marked as
dev in bsconfig.json.

docs

move things

fix flags order. fixes rescript-lang#89

refmt some, also support formatting for interface files

fixes rescript-lang#98

fix bsb-native flag processing

fix atom reload loop, fixes rescript-lang#100

first release

Minor change, update url to new location (rescript-lang#103)

fix merlin flags order - fixes rescript-lang#104, undoes rescript-lang#89

filter out invalid (pseudo) module names. fixes rescript-lang#102

show bucklescript errors in reason format. fixes rescript-lang#106

fix opens from package opens

show bsconfig.json errors

parse out -open XYZ declarations from merlin flags fixes rescript-lang#110

fix major completion bug

publish 1.0.2

fix windows

docs(Readme.md): add info how to install official extension for vscode (rescript-lang#115)

wait

better completion of constructors

1.0.3 - fix windows, better completion

better error message for bsb issue

fix texts

ok all fixed

isolate the things

further isolate the cmt/cmi stuff

some cleanup

refmt

Display project wide warnings & errors (for unopened files) fixes rescript-lang#113

working toward better es6 imports support

try imports

add logo

fix processing of mli files, get types, modules and includes. fixes rescript-lang#93

trying it outt

fix test case

dedup completion items. fixes rescript-lang#107

make signaturehelp more robust

cleanup tests

fix

fix all tests, ok its good now

preparing for better interface handling.. . localModules just a list

getting closer to good interface handling

typo

fix let%foo syntax highlighting

Include bs-dev-dependencies when searching for findDependencyFiles (rescript-lang#119)

* Typo

* findDependencyFiles includes bs-dev-dependencies

add support for shutdown message. fixes rescript-lang#124

show type hover for constants. fixes rescript-lang#97

list module contents on hover

show constructor arguments when hovering a constructor

using intfs

add a cross-module + interface test

allow interface files in tests

find definitions between interface and implementation files

add the interface file here

renames

show record and variant type info on hover

better rename with interface files

working on the namespace thing. halfway done

simplify "extratypeinfo"

wip

version 1.0.4

ignore "inconsistent assumptions" errors. fixes rescript-lang#117

surface "ninja errors" in bsconfig.json

Parse correctly :identifier and -value in jbuild files (rescript-lang#127)

reload all state when a new file is created

esy it up

move to src

ok belt is ready I think

getting closer i think

umm working?

help text & warnings fix

bringing in 402 typing stuff

rename to unifiedtypes

moving off of compiler-libs typing

402 compiling under 406 I think

ok, working!

type equality of things that dont change

moving things around -- still broked

rename

simplify

move more

ok, unifiedtypes is the only non-isolated thing

remove Definition.re

moving a couple things around

first foreys

ok gonna do the whole type replacement hting

ok, type_expr is gone!

declarations are out!

rm unified label

whoooo Compiler_libs_402 is now only used by Process_402

type it

add a 406 version??? wow

working on getting a shared definition w/ preprocessing for diff versions

printtype back to normal

processcmt + extra are now aligned

ok, might be done?

wheeee 402 is working again

rm olds

ummm so does this work?

fix reloading thing, and fix dune file parsing

esy: Add appveyor.yml for windows CI (rescript-lang#130)

* Add appveyor.yml

* Quick sanity check of output binary

maybe upload things

rebuild mac & windows

too-fancy

1.1.0 release - support for OCaml 4.6.0!

Update Readme.md

Add "show_module_path_on_hover" setting (#135)

* Add "show_module_path_on_hover" setting

* Tweak json for rebuild

getting tests up to date

ok, test suite building & passing

working on type-digger

full stuffs

ok, lots of type differ is in good shape

ok handle tuples too

nit

bool

fix scoping of constrained module types

simple types maybe

ok much happier with this setup

lots of refactors

wip serialize

some json

progress I think

ok dont except for abstracts i think

last fixes to make abstracts work

working on deserialization

ok variants I think

had to rename Result to RResult. go figure. also more things are working

working!

better cli (multiple entrypoints), and handle arrays

better message

trying out some codemod things

hmmm ok, trying some codemod stuff out;

trying to get the things going

use refmt directly

working!

work it

move that stuff to a lib

umm, this is worse?

ok maybe this is usable as a lib

wip

fixx

expose belt_ppx

ignore more

add readme

types

more docs

fix library decl

fix type digging

interface actions! create a full interface file, or add an individual value/type to the interface file

trying to nail down esy
/dune

ok, finally dogfooding rls is working again

Changes for better support for bsb-native 4.0.6 (rescript-lang#140)

* Adding support for bsb-native's new name.

We're probably going to switch to having bsb-native be called that
inside the node_modules folder. This breaks reason-language-server.
This changes un-breaks us.

* Use refmt.exe instead of refmt3.exe for 4.0.6

fix appveyor

fix circleci

update binaries

updates

split the lsp code from the analyze code. major step

move analyze tests

add tests for checking the example files have loaded

Add snippets for vscode (#146)

relock, get examples ready for testing

try to cache the examples stuffs

try agian

fix example

lol fix tests

bad module name issue

try a fix

add test for name_with_underscore

other one is breaking windows

1.2.0

add a test for go-to-module definition

longident for type references

longident for type references

wip testing

move for base

sweet, better definition tracking for functor calls

fix resolution for namespaced deps

max render depth

fix the "cant find module name" issue

fix rescript-lang#129

skip comments in dune files

chasing includes

works!

get you to the right file at least

release

adding tests for hover

working single tuple!

bring in to base

unique type names

add to base

Support reading from .merlin for -backend flag (rescript-lang#142)

* Add support for reading the .merlin file containing the -backend flag.

Bsb-native will put the backend flag in there so reason-language-server
knows how to call bsb.

* Remove derp newlines

* Move function to MerlinFile

release 1.2.2

extract out the bs-json specific stuff from type-diggers serializers

moving stuff

fixx

bugfix release

bugfix again

1.2.4

Enable comment syntax highlighting in jsx attributes (#155)

This allows proper syntax highlighting of comment blocks `/* comment */` of JSX attributes in Reason files.

Update Changelog.md

Added install step for Vim and cleaned up the text (#156)

* Added install step for Vim and cleaned up the text

* The Vim installation was missing the step that says to download the zip file from the releases page
* Minor clean up of formatting keyboard sequences and names
* Moved all links to the bottom

* Put links back in-line

show proper filename for dune (#164)

use jbuildPath in error message

Add snippets for Reason (#163)

* Add snippets for Reason

* a more conservative set of snippets

stop sabatoging esy rebuilds!

lockdown esy version

v1.2.5 published

add a logo

change sublimetext package name (#169)

Esy 0.3.x support (#170)

* Esy 0.3.x support

fixes #166

* _build stopped existing

Show types for module members (#175)

* per-item codeLens type in nested modules

* fix small bit of comment

unix ignore

Use `esy command-env` to get the Esy target directory (#174)

* Use `esy command-env` to get the Esy target directory

This is better than a hardcoded path because it works in all esy
versions. Furthermore, it also makes RLS work with Esy aliased sandboxes

* error instead of assert false

* address code review

add a platform support section

Add a license (#179)

fixes #178

fix json unicode parsing

Support opam+dune projects (#173)

* Add example-opam-dune-project

* Support opam+dune projects without esy

fixx

Add support for OCaml 4.07 (#167)

* Add support for OCaml 4.07

* try esy 0.2.11

* working nicely under 4.07!

* Fix code review comments and rebase on master

* forgot to regenerate the lockfile

* ignore

fix esy version (#181)

Disable formatOnSave for reason (#182)

* disable formatOnSave for reason

* actually turn off formatOnSave

updates

Allow to turn off autoRebuild (#183)

* fix langauge server location for example project

* parse autoRebuild value from settings

* disable buildCommand when autoRebuild is off

* tweak readme

Support global OPAM switches (#184)

Cache _esy folder for faster builds (#185)

Update appveyor.yml

Remove esy version detection (#186)

We now do things in a way that's compatible across every esy version.
This is just introducing unnecessary complexity.

Parse more of dune/jbuild files (#191)

Get ocamlopt.opt and refmt from the sandboxed alias in Esy if any (#190)

Make finding $OCAMLLIB work with Esy sandbox aliases (#188)

* Make finding $OCAMLLIB work with Esy sandbox aliases

* fix code review suggestions

Update Readme.md

Disable autoRebuild inside Esy named sandboxes (#192)

* Disable autoRebuild inside Esy named sandboxes

Esy doesn't yet tell us which named sandbox we're in. Let's disabled
autoRebuild for this case while we wait for support in Esy proper.

I'm also opening a general issue about RLS in Esy which I'll link here
shortly.

* Update Main.re

* code review

testings

Bring in all the autoserialization goodness (#196)

This is finally in a place where it's self-hosting -- the config & lockfile ser/de are generated within it. Also we have auto-migration & backwards compatability ;)

Support every ASCII char in dune/jbuild files (#195)

woops

fix

allow adding entries

fix package-json

fix test command

Describe how to configure reason-language-server with vim (#203)

* Describe how to configure reason-language-server with vim

* Add missing LanguageClient-neovim link

Fix syntax error in vim config in Readme (#204)

fix circle

1.4.0

Look for `public_name` too when figuring out a dune library name (#208)

Since ocaml/dune#1041, `name` is optional in
Dune whenever `public_name` has been specified.

Support es6-global compilation (#212)

* Support es6-global compilation

* Avoid repetition

* Handle missing case

fix warning

Clean up build warnings (#187)

* Clean up build warnings

Wow there were a lot of them

* code review

vscode: add syntax highlighting for md embed (#224)

Dedupe the source files list. (#226)

Let's say I have
- src/dir/X.re
- src/dir/X.rei
- src/dir/sub/Y.re
- src/dir/sub/Y.rei

findProjectFiles would then be fed with src/dir and src/dir/sub.

Y.re & Y.rei would appear two times in files.

When iterating over the files to generate normals, an interface is removed from the hashtbl as soon as its implementation file is treated, meaning the first occurence of Y.re would be considered to contain an interface, the second one would not.

binaries

add lockfile I guess

fix bsb-native stdlib detection

Add "build_system_override_by_root" config option (#206)

* Add "build_system_override_by_root" config option

This will allow users to manually override the build system when
inference isn't cutting it.

* lint

fix test for new esy

fix ci maybe

fix ci again

fix

more

more CI fixes I hope

npm run instead

why is esy timing outtttt

other try

inline

inline different

ok :fingers-crossed:

ok maybe windows will work now tho

Now with "show fully ppxed source" action :D :D :D

live update too

also interfaces

fix error caused by old merlin files with bad directories

use private name first, then public

add a "show AST" command

Escape spaces in ppx-flag arguments when passing to bsb (#231)

* Escape ppx-flag arguments

* Simplify ppx flag quoting in bsb-native case

* fix typo

better conversion to reason syntax

v1.5.1

support for line comments

fix tests to catch #232 that slipped through

Add version to Esy variant + conditional command to getStdlib in esy case (#236)

hopefully fix windows

Fix project root detection for source files at the toplevel (#239)

fix dune source file detection. TODO switch based on dune version

Fix CI (#260)

* random change to show that ci is broken

* Fix ci

* Update config.yml

* idontknowwhatiamdoing.gif

* Update LICENSE

add emacs config (#258)

(- mdata fix) Make default format_width value of declared type (#253)

Update Readme.md (#251)

better config docs

Add support for bs-platform 5.0.0 custom namespace (#259)

* Add support for bs-platform 5.0.0 custom namespace

See recent change in "namespace-spec" here https://bucklescript.github.io/bucklescript/docson/#build-schema.json

* Add support for bs-platform 5.0.0 custom namespace, fixup pre-5.0.0

better tests, now we can check compatible upgrades without requiring a version bump

only print reason if the outfile is .re

tail-call optimize array/list serde

wip fixing migration of type variabled things

wip

building again

fix migration of types with parameters

some refactoring, getting closer

newtypes working!

..closer

fix application order for migrators

ok so I have a repro for this last issue. apparently need newtypes again

ok newtypes looking good

wip row variant stuff

ok process variants

almost variants, dont have the args good yet

ok now parsing the argument correctly, but not processing it yet

ok working now!

add override option

making a new config thing

maybe working? almost

fix lockfile

ok, new config format is now compiling. not supporting multiple engines yet though

some small refactorings

ok, move all types & migration to their own separate modules

more refactor

refmt

add an "upvert" option, but it writes out "null"s instead of omitting optional attributes, so will need to fix that at some point

use specified helpers

self-rebuild w/ new changes

some cleanups

locked types instead of output types

some small cleanups

more cleanups

add ezjsonm

generate type constraints for record literals to fix the "record attr shadowing" issue

add ezjsonm to kitchen sink

also yojson

small refactors

some refactorings

Adjust link to LSP website home (#261)

I found it weird, when I clicked to been sent to a given page, in a specific section.
I would have expected the click to lead me to something like a homepage.
Fixed it!

remove type-digger

Escape pp-flags arguments when parsing .merlin (#266)

Imagine a .merlin containing:
```
FLG -pp /Users/iwan/Development/pp-demo/./node_modules/.bin/napkinscript -ancient
```
`-ancient` shouldn't be picked up as separate compiler flag, but as part of
the napkinscript preprocessor

Add support for bs-platform with 4.06 ast (#267)

* Select correct compiler version based on Bucklescript's version

* Add minimal semver parsing support

wip rejiggering

trying a mostly straight merlin approach

close to working

ok newfangled is working

ok I think we are almost back to parity

ok now alltests is running, that was a goose chase

sweet alltests working

fixing some definitions

fix go-to-definition for belt

more fixes

add back in the stdlibs

lets have some arguments parsing

ready for "verify definitions on rls source code"

ok, most things are resolving now :)

Add `useOldDuneProcess` flag for ease of transition

rename so I can release to npm too

woops the new thing should be enabled for library users

ignore more for npm

readme up

fix cp-test

ci maybe

woops reenable examples

Fix escaping of preprocessing-flags after merge of 'dune-merlin'. (#269)

The merge seems to have overwritten jaredly/reason-language-server#266

fix #268

trying to fix appveyor

back to _build I think

esy test not working 🙃

prepare for 1.6.0

update installation instructions for sublime text (#277)

Change the suggested LSP preferences to:

- Enable reason-language-server for .ml files.
- Enable for sublime-reason (the same Reason sublime package is published under two names: Reason and sublime-reason).

Quote ppx/pp filenames when not already quoted (#281)

try to fix CI

copy the artifact before running tests

oh it was circleci that was unhappy

update for 1.6.1

always log MerlinFile errors

minor fixes to dune parsing

trying out this sponsorships thing

Delete FUNDING.yml

more general handling of quote (#304)

Fix locations for complex idents (foo.bar) that went through ppx (#303)

Don't apply other preprocessing flags to Reason files. (#300)

Refmt is the only pp that should be applied to Reason files.
If a bsconfig contains "pp-flags", they shouldn't be applied to .re files.
Refmt is the source of truth. Follows the behaviour of Bucklescript itself.

Set up CI with Azure Pipelines (#307)

yasssss let's get this done. Supercedes #207, which seems fitting somehow

Update Emacs configuration (#308)

Currently `client/registerCapability` is not supported yet. So we will ignore its notification temporarily.

getting ready for publish

Close #299 - Add re support to markdown codeblock (#310)

Better multi-line comments configuration in vscode (#302)

Fix vscode comments highlight with // inside block comment (#289)

add some more util testing, hopefully fixes #284

nameSpaceToName should elide '@' + split on both '/' and '-' (#312)

fix parsing for dune library syntax (#315)

Add a line about symlinking the build executable (#313)

Resolves jaredly/reason-language-server#298

Fix #290

vscode ext version bump

Setup github workflow for reason-langage-server (#323)

Support OCaml 4.08 (#305)

* Support OCaml 4.08

* Merlin extend is in reason

* newest reason from master

* Use released Reason, get rid of build warnings

* better instructions for assembling the compiler sources

* Use OCaml_current, fix compilation after rebase

* build against OCaml 4.08.1 and run esy

Fix let syntax in OCaml (#330)

RLS on Windows (#318)

* minimal fix for windows

* Fix global dependencies of esy for windows.

* Fix things that could break on windows.

Port old syntax build system (#331)

* Ignore typescript output

* Add OCaml grammar source

* Add typescript config

* Add syntax build script

* Add npm script to build syntaxes

* Add OCaml grammar build instructions

Add coc.nvim extension (#333)

* Init coc.nvim

* Add build deps

* Add build config

* Add eslint

* Add basic extension

* Add prettier config

* Add babel preset target

* Add command extraction impl

* Add current release version

* Update gitignore

* Add npm scripts

* Add npmignore

* Add npm metadata

Fixes unexpected behavior of (** (#346)

add coc extension readme (#343)

add coc.nvim config synchronization (#342)

Add space between number and "more" (#339)

Previously you would see something like "a, b, c and 4more". This adds a space between before "more".

Add typescript as a syntax dev dependency (#356)

Calculate ESY__CACHE_INSTALL_PATH. Fixes failing MacOS ci (#354)

fix macos hopefully

Make client/registerCapability a request (#353)

From the spec
> Register Capability
> The client/registerCapability request is sent from the server to the client to register for a new capability on the client side.

Updated Readme.md too!

version

revert the registerCapability change

Revert "revert the registerCapability change"

This reverts commit 5857c97.

Revert "Make client/registerCapability a request (#353)"

This reverts commit 43adc0d.

get fixture tests going

Upgrade ci to use latest from hello-reason (#361)

* Upgrade ci to use latest from hello-reason

* esy-build-steps->build-platform

* Add publish-build-cache template

Fix issue where getting the ident binding time only works for 4.08. (#363)

* Fix issue where getting the ident binding time only works for 4.08.

* Cosmetic: make the ident hack explicit so it's clear it only works for 408.

version up

Rm "old dune process". It will not be missed (#366)

* Rm "old dune process". It will not be missed

I've had it disabled in tests, but enabled by default, which was in hindsight probably not the best.
I meant to remove it very soon after adding it, just as a compatability measure. It should have been removed long ago.

* fix esy lock

* lock to 4.8

* windows skip

Add option to supply a formatter for ml files (#368)

* Add support for external .ml files formatter

* Simplify fmtCmdForUri: return type result(string, string)

Add tests to verify that jump-to-definition still works with previous ocaml versions (#369)

trying out rely

reenable the other fixtures

moving things over

ok got some failing tests for bs, which isnt awesome

ok ready with rely

ready

prepare

maybe fix timeout

loggs

wat

none

plain

Revert "plain"

This reverts commit 47e63a6.

Revert "none"

This reverts commit 65dfefe.

utils

more

some caching

run the pre

wz path

wip

gaa

compiling

plain

plain

maybe working

recursion

wow working recursive I guess

ok events

ok, so its working but not nested I guess?

ok some nesting

ok passing a suite works

some refactor

some reporting

ready for use maybe

using relite

mo better

track some time, fix some tests, add skipIf for suites

ok set exit code correctly

um

nofatal

maybe fix windows

better rimraf maybe

woops

working toward retest

cleanup

fix error parsing in 4.08. Fixes #371

fix #379

fix: duplicate key in capabilities

jaredly/reason-language-server#290

update pacakge-lock.json in example-react

lets try out a github release flow

Spell correction

actions: release

1.7.5
should fix the crash-on-launch from 379

fix dune file parsing, ignore \r

Report error for edge case for bsb-native. (#382)

* Report error for edge case for bsb-native.
... where .merlin has -backend but bsconfig's entries got updated and
don't have that backend anymore.

* merge in

Co-authored-by: Benjamin San Souci <benjamin.sansouci@gmail.com>

Add instructions for installation in ArchLinux (#391)

add troubleshooting info (#388)

fix #399 (#400)

Fix highlighting of `[@bs.as]`. Fixes #396. (#397)

Fix: URI from LSP is decoded properly (#392)

Fix flags for BuckleScript packages so that ppxs binaries can be found (#360)

* Fix FLG from Merlin for BuckleScript ppx-flags to point to node_modules/.bin

* Add example for bs 7.0.1

* Change ppx path to include package folder and remove node_modules/.bin prefixing

* use jsx3 and latest reason-react to see if this fixes windows ppx issues

* try building whole project before running bsc commands

* Revert "try building whole project before running bsc commands"

This reverts commit eea2b94dc937eec86efed07b8f5349a64bff20c6.

* call npm install from outside ExampleTests + use script instead of bash in yaml template

* ggggaahhhhh

* try to debug some stuff

* add npm build and logging

* run

* try yarn

* revert changes and use node 12

* yarn

* namespace

* try different example

* appveyor simple

* remove more

* node 12

* y

* f

* n

* Revert "n"

This reverts commit d25fcf97ba9037839c33c9e617ba5ca9e6c1a4a8.

* 64

* 2019

* roll back changes

* remove new example

actions: release

1.7.6
several fixes

Follow up for #397; I forgot to build the syntax json. (#406)

fixing bsc.exe location and -bs-no-builtin-ppx flag

try to test again latest version

Fix refmt location and parsing ocaml-version

snapshot changes

add new bs-7.2 example test

lockfile updates

actions: release

1.7.7, really support bs-7.2 this time

last fix (#413)

actions: release

fix 7.1

Update coc-reason to rls 1.7.8 (#410)

Fix OCaml syntax highlighting for let followed by attribute. Fixes #409. (#412)

Hide lowercase modules. (#418)

Fix: formattter was removing the trailing line (#424)

Bump coc-reason version (#432)

fix link to ocaml language server (#443)

Co-authored-by: JP Lew <jp@cto.ai>

Expose function to get current language server client from other VSCode extensions, to allow other extensions to call the language server client directly. (#444)

Update ST instructions (#455)

Respect autorebuild for dune projects (#442)

"Dependencies: -" if there are no dependencies (instead of "Dependenc… (#438)

* "Dependencies: -" if there are no dependencies (instead of "Dependencies:")

* `Dependencies: [none]`

Support esy in monorepos (#440)

actions: release

version 1.7.9
fixing some build system compatability bugs

Test new highlighter

actions: release

1.7.10

trying out a new highlighter

feat: update coc-reason version (#456)

Bump coc-reason version (#457)

Second attempt to fix #417 (and fix #458 too) (#460)

* Revert "Hide lowercase modules. (#418)"

This reverts commit a8458b1.

* Omit lowercase modules in value completions.

actions: release

1.7.11
chenglou pushed a commit to chenglou/rescript-editor-support that referenced this issue Apr 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants