Errors but still compiling

Hi
I am editing some code and there is one file where anytime I make any changes it causes my project to throw tons of the same error. Looking at the issue it seems to not be considering my changes to that specific file. If I compile the project it succeeds with no issues so the error seems to be non-existent. Is there a way to force the project to go back through all the files and re-check the types?

For reference here is the error and the types that are giving the issue

Could not match type

    ( ... )

  with type

    ( mediaCarouselMap :: Map PlaylistKey
                            { etag :: String
                            , value :: CatArray MuMedia
                            }
    ...
    )


while trying to match type
                             ( ... )

  with type
              ( mediaCarouselMap :: Map PlaylistKey
                                      { etag :: String
                                      , value :: CatArray MuMedia
                                      }
              ...
              )

while checking that expression assembleMuMedia (r.value)
  has type ValidatorT String (Tuple (CatList String) (Map AssemblerSource String))
             { contentKeyURLMap :: Map ContentKey
                                     { cacheKey :: String
                                     , cached :: Boolean
                                     , etag :: String
                                     , request :: ...
                                     , url :: String
                                     }
             , dataGridSourceMap :: Map DataGridKey
                                      { etag :: String
                                      , value :: DataGridSource
                                      }
             , mediaCarouselMap :: Map PlaylistKey
                                     { etag :: String
                                     , value :: ...
                                     }
             , mediaRSSMap :: Map MediaRSSKey
                                { etag :: String
                                , value :: MediaRSS
                                }
             , textRSSDataMap :: Map TextRSSKey
                                   { etag :: String
                                   , value :: TextRSSData
                                   }
             , timeZoneConverter :: { etag :: String
                                    , value :: { fromUTC :: ...
                                               , incMaxYear :: Year
                                               , incMinYear :: Year
                                               , timeZone :: TimeZone
                                               , toUTC :: ...
                                               }
                                    }
             , urlMap :: Map String
                           { cacheKey :: String
                           , cached :: Boolean
                           , etag :: String
                           , request :: ...
                           , url :: String
                           }
             , videoOverlappable :: Boolean
             , volume :: { etag :: String
                         , value :: Percent Number
                         }
             , weatherLayoutDataMap :: Map LocationId
                                         { etag :: String
                                         , value :: WeatherLayoutData
                                         }
             }
             Identity
             t0
in value declaration assembleMediaMap

where t0 is an unknown type
PureScript(TypesDoNotUnify)
assembleMuMedia :: MuMedia → Assembler MediaSlide
assembleMuMedia :: MuMedia → ValidatorT String (Tuple (CatList String) (Map AssemblerSource String)) { contentKeyURLMap ∷ Map ContentKey { cacheKey :: String , cached :: Boolean , etag :: String , request :: { md5Checksum :: Maybe String , realURL :: String , strategy :: CacheStrategy , virtURL :: String } , url :: String } , dataGridSourceMap ∷ Map DataGridKey { etag :: String , value :: DataGridSource } , mediaRSSMap ∷ Map MediaRSSKey { etag :: String , value :: MediaRSS } , textRSSDataMap ∷ Map TextRSSKey { etag :: String , value :: TextRSSData } , timeZoneConverter ∷ { etag :: String , value :: { fromUTC :: Instant -> { offset :: Minutes , value :: DateTimeLocal } , incMaxYear :: Year , incMinYear :: Year , timeZone :: TimeZone , toUTC :: DateTimeLocal -> Either { excMax :: DateTimeLocal , incMin :: DateTimeLocal } (NonEmptyArray { offset :: Minutes , value :: Instant } ) } } , urlMap ∷ Map String { cacheKey :: String , cached :: Boolean , etag :: String , request :: { md5Checksum :: Maybe String , realURL :: String , strategy :: CacheStrategy , virtURL :: String } , url :: String } , videoOverlappable ∷ Boolean , volume ∷ { etag :: String , value :: Percent Number } , weatherLayoutDataMap ∷ Map LocationId { etag :: String , value :: WeatherLayoutData } } Identity (Fn3 (Maybe { key ∷ PlaylistKey , name ∷ String } ) (Maybe { id ∷ String , key ∷ ContentKey , name ∷ String } ) (Map PlaylistKey (AABB Pixels Pixels → Slide)) (AABB Pixels Pixels → Slide) )
type AssemblerInput =
  { contentKeyURLMap ∷ Map ContentKey AcquiredURL
  , dataGridSourceMap ∷ Map DataGridKey (Resolved DataGridSource)
  , mediaRSSMap ∷ Map MediaRSSKey (Resolved MediaRSS)
  -- , textRSSMapFromMRSS ∷ Map MediaRSSKey (Resolved TextRSSData)
  -- , splash ∷ Maybe AcquiredURL
  , textRSSDataMap ∷ Map TextRSSKey (Resolved TextRSSData)
  , timeZoneConverter ∷ Resolved TimeZoneConverter
  , urlMap ∷ Map String AcquiredURL
  , volume ∷ Resolved (Percent Number)
  , weatherLayoutDataMap ∷ Map LocationId (Resolved WeatherLayoutData)
  , videoOverlappable ∷ Boolean
  , mediaCarouselMap ∷ Map PlaylistKey (Resolved (CatArray MuMedia))
  }

data AssemblerSource
  = AsmSrcContentKeyURL ContentKey
  | AsmSrcDataGrid DataGridKey
  | AsmSrcTextRSSData TextRSSKey
  -- | AsmSrcTextRSSDataFromMedia MediaRSSKey
  | AsmSrcTimeZoneConverter
  | AsmSrcURL String
  | AsmSrcVolume
  | AsmSrcWeatherLayoutData LocationId
  | AsmSrcMediaRSS MediaRSSKey
  | AsmSrcCarouselMedia PlaylistKey

type AssemblerWarnings = CatList String

type AssemblerSources = Map AssemblerSource String

type AssemblerLog = Tuple AssemblerWarnings AssemblerSources

type Assembler a = Validator String AssemblerLog AssemblerInput a

I reverted all changes to the specific trouble file but the errors are still not clearing. They are still looking for mediaCarouselMap but there are no longer any references to this in my code. I am very frustrated.

If you delete the output and .spago folder it should redownload and recompile everything

1 Like

Unfortunately this project does not seem to use spago. I have .psci_modules, .pulp-cache, bower_components and output. If I want to rebuild output would I delete that folder then run ‘pulp build’?

AYYYYYE it worked. Thanks. I was losing my mind

2 Likes

yes that should work - it’s most likely in output (sometimes the editor plugin get’s confused - for example when you remove a file the output will still be there and will be found)

1 Like