Skip to content

add a fix for redundant layer merges in effect provide - #767

Open
tylergibbs1 wants to merge 7 commits into
Effect-TS:mainfrom
tylergibbs1:agent/redundant-layer-merge-provide
Open

add a fix for redundant layer merges in effect provide#767
tylergibbs1 wants to merge 7 commits into
Effect-TS:mainfrom
tylergibbs1:agent/redundant-layer-merge-provide

Conversation

@tylergibbs1

Copy link
Copy Markdown

summary

Effect.provide already accepts an array of layers, but the language service does not flag a direct Layer.mergeAll call.

this adds a suggestion for both supported effect versions and leaves transformed or precomposed layers alone.

example

Effect.provide(Layer.mergeAll(foo, bar))
// becomes
Effect.provide([foo, bar])

validation

  • pnpm codegen
  • pnpm lint
  • pnpm check
  • pnpm test
  • pnpm test:v4

closes #734

@changeset-bot

changeset-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 19f3d37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@effect/language-service Minor

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

@tylergibbs1

Copy link
Copy Markdown
Author

Fixed the v4 CI crash in 79779a6. The diagnostic now uses the TypeScript API helpers/fields (ts.getTokenPosOfNode and node.end) instead of deprecated node instance methods, which are absent in the v4 harness. Validation: pnpm codegen, pnpm lint-fix, pnpm check, pnpm test, and pnpm test:v4 all pass (651 v3 tests and 653 v4 tests).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 79779a63ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/language-service/src/diagnostics/redundantLayerMergeAllInProvide.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d1a33f751

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10f1fc933d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/language-service/src/diagnostics/redundantLayerMergeAllInProvide.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 280fbc70a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/language-service/src/diagnostics/redundantLayerMergeAllInProvide.ts Outdated
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.

Remove redundant Layer.mergeAll from Effect.provide

1 participant