Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Limit sourceror dep environments in mix.exs#242

Open
cmnstmntmn wants to merge 1 commit intoliveview-native:mainfrom
cmnstmntmn:patch-1
Open

Limit sourceror dep environments in mix.exs#242
cmnstmntmn wants to merge 1 commit intoliveview-native:mainfrom
cmnstmntmn:patch-1

Conversation

@cmnstmntmn
Copy link
Contributor

Limit the sourceror dep availability to dev and test.

Reason

While trying install live_view_native in an existing codebase that's already using sourceror defined like:

{:sourceror, "~> 1.8", only: [:dev, :test]},

I'm getting this error:

Dependencies have diverged:
* sourceror (Hex package)
  the :only option for dependency sourceror

  > In mix.exs:
    {:sourceror, "~> 1.8", [env: :prod, hex: "sourceror", only: [:dev, :test], repo: "hexpm"]}

  does not match the :only option calculated for

  > In deps/live_view_native/mix.exs:
    {:sourceror, "~> 1.5", [env: :prod, hex: "sourceror", repo: "hexpm"]}

  Remove the :only restriction from your dep
** (Mix) Can't continue due to errors on dependencies

If I’m not mistaken, sourceror isn’t required at runtime and is only used in development contexts. If that’s the case, restricting its inclusion in live_view_native to only: [:dev, :test] would prevent these dependency conflicts and avoid bringing it into production builds unnecessarily; ignore this PR otherwise.

Limit the `sourceror` dep availability to dev and test.

**Reason**

While trying install `live_view_native` in an existing codebase that's already using sourceror defined like:
       
```
{:sourceror, "~> 1.8", only: [:dev, :test]},
```

I'm getting this error:

```
Dependencies have diverged:
* sourceror (Hex package)
  the :only option for dependency sourceror

  > In mix.exs:
    {:sourceror, "~> 1.8", [env: :prod, hex: "sourceror", only: [:dev, :test], repo: "hexpm"]}

  does not match the :only option calculated for

  > In deps/live_view_native/mix.exs:
    {:sourceror, "~> 1.5", [env: :prod, hex: "sourceror", repo: "hexpm"]}

  Remove the :only restriction from your dep
** (Mix) Can't continue due to errors on dependencies
```

If I’m not mistaken, `sourceror` isn’t required at runtime and is only used in development contexts. If that’s the case, restricting its inclusion in `live_view_native` to `only: [:dev, :test]` would prevent these dependency conflicts and avoid bringing it into production builds unnecessarily; ignore this PR otherwise.
@cmnstmntmn cmnstmntmn changed the title Limit sourceror dep environments in mix.exs Limit sourceror dep environments in mix.exs Jun 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant