Skip to content

Conversation

@anotherjesse
Copy link
Contributor

No description provided.

@anotherjesse
Copy link
Contributor Author

still a little more cleanup ...

i was a little too aggressive on deletion - i don't think modules are handled right!

and a few more tweaks - since recipes need to be put in their place (the proper space) some of our code doesn't know what space things end up in (the iterate on 506 line below in type errors)

TS2552 [ERROR]: Cannot find name 'charmManager'. Did you mean 'CharmManager'?
    space: charmManager.getSpace(),
           ~~~~~~~~~~~~
    at file:///Users/jesse/ct/cell-recipes/charm/src/iterate.ts:506:12

TS2339 [ERROR]: Property 'getAsCellLink' does not exist on type 'Promise<Cell<Charm> | undefined>'.
        argumentLink = argumentCell.getAsCellLink();
                                    ~~~~~~~~~~~~~
    at file:///Users/jesse/ct/cell-recipes/charm/src/manager.ts:403:37

TS2339 [ERROR]: Property 'getAsCellLink' does not exist on type 'Promise<Cell<Charm> | undefined>'.
          const argumentLink = argumentCell.getAsCellLink();
                                            ~~~~~~~~~~~~~
    at file:///Users/jesse/ct/cell-recipes/charm/src/manager.ts:1108:45

TS2345 [ERROR]: Argument of type 'DocImpl<undefined>' is not assignable to parameter of type 'Cell<Charm>'.
  Type 'DocImpl<undefined>' is missing the following properties from type 'Cell<Charm>': set, update, push, equals, and 9 more.
    expect(lastError?.recipeId).toBe(getRecipeIdFromCharm(charm));
                                                          ~~~~~
    at file:///Users/jesse/ct/cell-recipes/runner/test/recipes.test.ts:723:59

TS2345 [ERROR]: Argument of type 'DocImpl<undefined>' is not assignable to parameter of type 'Cell<Charm>'.
  Type 'DocImpl<undefined>' is missing the following properties from type 'Cell<Charm>': set, update, push, equals, and 9 more.
    expect(lastError?.recipeId).toBe(getRecipeIdFromCharm(charm));
                                                          ~~~~~
    at file:///Users/jesse/ct/cell-recipes/runner/test/recipes.test.ts:786:59

Found 5 errors.

error: Type checking failed.

@anotherjesse
Copy link
Contributor Author

@seefeldb fyi, some work in progress - I think we could merge this idea of "recipeMeta" with the "recipe" of the charm - and then everything just works?

it was MUCH faster doing it this way ... the way the framework works currently triggers 12 (+/-4) download/compile to recipe flows just to access the charm

Copy link
Contributor

Nice!

Hmm, there's an argument to be made to just treat the recipe as data of the charm, i.e. replace [TYPE] and the hash with just a cell link to the data. Then charm meta and recipe meta become the same (and both can still refer to other charms). And "imported from spellbook" is meta data as well.

Mostly saying in case it makes things even easier - just get rid of all the recipe id stuff, and recipes are just source code. But might also be too much of a leap at once?

@anotherjesse
Copy link
Contributor Author

@seefeldb I definitely have thought about doing that all in one go. but I ultimately decided against it as it is changing too much

as is, I was over aggressive about "oh, we don't need to register modules, ..." and need to re-add that!

so, I think a second pass where we link them to the charms as recipe nodes...

);
}

this.syncRecipe(charm);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be awaited?

@anotherjesse
Copy link
Contributor Author

anotherjesse commented Apr 25, 2025 via email

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.

4 participants