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

Optics KSP Plugin breaks if the word “data” is part of the package #3134

Closed
sindrenm opened this issue Oct 2, 2023 · 0 comments · Fixed by #3326
Closed

Optics KSP Plugin breaks if the word “data” is part of the package #3134

sindrenm opened this issue Oct 2, 2023 · 0 comments · Fixed by #3326

Comments

@sindrenm
Copy link

sindrenm commented Oct 2, 2023

With the Arrow 1.2.1 (and possibly 1.2.0) Optics KSP plugin, one of the files seem to get an import with a broken alias. I don't quite know why it's even importing the type, as the type it imports is in the same package as the generated code. And the import alias is broken because the package it's in includes the segment data:

Here's the top of the generated WorkoutHistoryPage__Optics.kt:

package com.sats.core.`data`.workouts.models

import arrow.core.left
import arrow.core.right
import arrow.core.toOption
import com.sats.core.`data`.workouts.models.WorkoutHistoryPage as comsatscore`data`workoutsmodelsWorkoutHistoryPage

This results in a compilation error because of the import alias:

WorkoutHistoryPage__Optics.kt:6:78 Expecting a top level declaration

This does work in 1.1.5, where the import is not generated. (edited)

@sindrenm sindrenm changed the title Optics KSP Plugikn breaks if the word “data” is part of the package Optics KSP Plugin breaks if the word “data” is part of the package Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant