Skip to content

Disallow update from targeting definitions in lib #5927

@pchiusano

Description

@pchiusano

Right now if you bring something from lib into your scratch file and update it, and that thing has dependents in lib, those dependents won't be updated to point to the new hash, and you'll see in todo a note about unnamed hashes.

We correctly don't want updates to propagate through lib, but we haven't closed this loophole.

Fixing this has an added benefit, which is you can put "schema" types in lib.schema or whatever, and you will not be able to accidentally modify these types. This is where I'd put data types and/or terms you're planning to put in storage and want to be very deliberate about changing or migrating.

This could be done as a quick check in the same place we produce slurp output. Here's some draft language:

🚫

Your scratch file has edits to the following definitions:

   lib.schema.Employee
   lib.schema.FavoriteFruit

Modifying definitions in `lib` is not allowed.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions