Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify config cache and make bare_config a function. #255

Merged
merged 1 commit into from
Oct 16, 2021

Conversation

ckipp01
Copy link
Member

@ckipp01 ckipp01 commented Oct 16, 2021

NOTE This commit contains a breaking change.

Previously when you were setting up your config table to pass into
initialize_or_attach() you'd start by creating a bare config like
this:

Metals_config = require("metals").bare_config

The problem with this was that the bare_config was just a table that
by you setting values to was actually mutating the bare_config table
internally. Since we'd like to keep that as a fresh bare config this
has been migrated to instead be a function that returns a bare config.
This means that where you are using bare_config you'll now want to
call it like so:

Metals_config = require("metals").bare_config()

Also, please subscribe to this discussion:
#253

All breaking changes will be listed there.

*NOTE* This commit contains a breaking change.

Previously when you were setting up your config table to pass into
`initialize_or_attach()` you'd start by creating a bare config like
this:

```lua
Metals_config = require("metals").bare_config
```

The problem with this was that the `bare_config` was just a table that
by you setting values to was actually mutating the `bare_config` table
internally. Since we'd like to keep that as a fresh bare config this
has been migrated to instead be a function that returns a bare config.
This means that where you are using `bare_config` you'll now want to
call it like so:

```lua
Metals_config = require("metals").bare_config()
```

Also, please subscribe to this discussion:
scalameta#253

All breaking changes will be listed there.
@ckipp01 ckipp01 merged commit 0a7ada5 into scalameta:main Oct 16, 2021
@ckipp01 ckipp01 deleted the config branch October 16, 2021 10:28
tymcauley added a commit to tymcauley/dotfiles that referenced this pull request Oct 17, 2021
nichobi added a commit to nichobi/dotfiles that referenced this pull request Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant