Exception during build: Artifacts that did no match any of the Bounded Context Configuration's topology were found

The exception you get is due to malformed files which is part of the Dolittle metamodel. The metamodel files has changed shape between different versions of Dolittle and our tooling has not taken this into account.

Background

Dolittle creates a metamodel of your code during build. This metamodel consists of a topology; structure of your application with your features and sub-features. In addition to this it creates a metamodel about all your artifacts; Commands, Queries, Events, ReadModels. The metamodel sits in two files in the .dolittle folder called artifacts.json and topology.json in the project that has the Build tool set up (default from our boilerplate is the Core project).

The reason for the metamodel is to provide a map of your application and enable versioning of artifacts, for instance doing migration of events between different microservices. Right now, the only thing it is being used for however is when you have two microservices and one needs to subscribe to events from another - it does this through the artifact identifier of the event. You can find an example of this in one of our samples here. A concrete example of how its being used on an event can be found here.

Solutions

Back to the topic of the exception. If you’re not relying on the artifacts as a contract between two different bounded context, you can delete the files and rebuild. However, if you do rely on some of the artifact identifiers - we recommend that you create a backup of the files and delete them and then rebuild to get the new format and put back the identifiers into the artifact - typically an event, that you share.

{
  "/* This refers to a feature found in topology.json */":"",
  "4cb82154-5cc8-4448-b5ed-491065d6d9d5": {
    "events": {
      "/* This is the unique identifier of the event */":"",
      "6c24fdef-dd46-4a51-8cf9-65cf6430da9d": {
        "generation": 1,
        "/* This is the actual fully qualified type string for the NET CLR Type */":"",
        "type": "Events.MyFeature.SomethingHappened, Events"
      }
    }
}

All of our files are registered with the JSON Schema Store (http://schemastore.org/json/)
And you find the schema definition for the files used during build here:
artifacts.json
topology.json
bounded-context.json

1 Like