summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2018-04-04 23:28:10 +0200
committerTor Egge <Tor.Egge@broadpark.no>2018-04-04 23:28:57 +0200
commitd7d9b5c4c5e9b332767c6bd53ecfa6a03fdb97b7 (patch)
treee9b9e4ee7ae95d5fed154b806acc6f52f480ee0d
parent08bcb0eeffe5ebf9e94aea9d719abda2662bdaf1 (diff)
Use forward declared DocumentTypeRepo.
-rw-r--r--document/src/tests/arrayfieldvaluetest.cpp1
-rw-r--r--document/src/tests/documenttestcase.cpp1
-rw-r--r--document/src/tests/documenttypetestcase.cpp1
-rw-r--r--document/src/tests/fieldpathupdatetestcase.cpp1
-rw-r--r--document/src/tests/fieldsettest.cpp1
-rw-r--r--document/src/tests/primitivefieldvaluetest.cpp1
-rw-r--r--document/src/tests/serialization/annotationserializer_test.cpp1
-rw-r--r--document/src/tests/serialization/vespadocumentserializer_test.cpp1
-rw-r--r--document/src/tests/struct_anno/struct_anno_test.cpp1
-rw-r--r--document/src/tests/structfieldvaluetest.cpp1
-rw-r--r--document/src/tests/testxml.cpp1
-rw-r--r--document/src/tests/weightedsetfieldvaluetest.cpp1
-rw-r--r--document/src/vespa/document/base/testdocman.cpp1
-rw-r--r--document/src/vespa/document/fieldvalue/document.cpp1
-rw-r--r--document/src/vespa/document/fieldvalue/structfieldvalue.cpp1
-rw-r--r--document/src/vespa/document/repo/fixedtyperepo.cpp24
-rw-r--r--document/src/vespa/document/repo/fixedtyperepo.h16
-rw-r--r--document/src/vespa/document/serialization/vespadocumentdeserializer.cpp1
-rw-r--r--document/src/vespa/document/serialization/vespadocumentserializer.cpp1
-rw-r--r--document/src/vespa/document/update/documentupdate.cpp1
-rw-r--r--memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp1
-rw-r--r--memfilepersistence/src/tests/spi/memfiletestutils.cpp1
-rw-r--r--memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp1
-rw-r--r--persistence/src/tests/dummyimpl/dummyimpltest.cpp1
-rw-r--r--persistence/src/vespa/persistence/conformancetest/conformancetest.cpp1
-rw-r--r--persistence/src/vespa/persistence/conformancetest/conformancetest.h7
-rw-r--r--persistence/src/vespa/persistence/dummyimpl/dummypersistence.h2
-rw-r--r--searchcore/src/apps/tests/persistenceconformance_test.cpp1
-rw-r--r--searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp1
-rw-r--r--searchcore/src/tests/applyattrupdates/applyattrupdates.cpp1
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp1
-rw-r--r--searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp1
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp1
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp1
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp1
-rw-r--r--searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp1
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp1
-rw-r--r--searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp1
-rw-r--r--searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp1
-rw-r--r--searchcore/src/tests/proton/server/visibility_handler/CMakeLists.txt1
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp20
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h10
-rw-r--r--searchlib/src/vespa/searchlib/index/docbuilder.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/index/docbuilder.h1
-rw-r--r--storage/src/tests/distributor/externaloperationhandlertest.cpp1
-rw-r--r--storage/src/tests/distributor/updateoperationtest.cpp1
-rw-r--r--storage/src/tests/persistence/common/filestortestfixture.cpp1
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp1
-rw-r--r--storage/src/tests/persistence/persistencetestutils.cpp1
-rw-r--r--storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp1
-rw-r--r--storage/src/tests/storageserver/documentapiconvertertest.cpp1
-rw-r--r--storage/src/vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h1
-rw-r--r--storage/src/vespa/storage/storageserver/documentapiconverter.h1
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h1
-rw-r--r--storageapi/src/vespa/storageapi/mbusprot/protocolserialization6_0.h1
-rw-r--r--streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp1
70 files changed, 126 insertions, 33 deletions
diff --git a/document/src/tests/arrayfieldvaluetest.cpp b/document/src/tests/arrayfieldvaluetest.cpp
index 8e1cbfafb43..74243ab1511 100644
--- a/document/src/tests/arrayfieldvaluetest.cpp
+++ b/document/src/tests/arrayfieldvaluetest.cpp
@@ -5,6 +5,7 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/document/util/bytebuffer.h>
+#include <vespa/document/repo/documenttyperepo.h>
using vespalib::nbostream;
diff --git a/document/src/tests/documenttestcase.cpp b/document/src/tests/documenttestcase.cpp
index c3f88ac3696..33d1a666d4a 100644
--- a/document/src/tests/documenttestcase.cpp
+++ b/document/src/tests/documenttestcase.cpp
@@ -7,6 +7,7 @@
#include <vespa/document/datatype/annotationreferencedatatype.h>
#include <vespa/document/fieldvalue/iteratorhandler.h>
#include <vespa/document/repo/configbuilder.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/document/src/tests/documenttypetestcase.cpp b/document/src/tests/documenttypetestcase.cpp
index 311a841e75e..d6707bc610a 100644
--- a/document/src/tests/documenttypetestcase.cpp
+++ b/document/src/tests/documenttypetestcase.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/repo/configbuilder.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/exceptions.h>
diff --git a/document/src/tests/fieldpathupdatetestcase.cpp b/document/src/tests/fieldpathupdatetestcase.cpp
index cade696e06c..89f9c0dab67 100644
--- a/document/src/tests/fieldpathupdatetestcase.cpp
+++ b/document/src/tests/fieldpathupdatetestcase.cpp
@@ -10,6 +10,7 @@
#include <vespa/document/update/documentupdate.h>
#include <vespa/document/repo/configbuilder.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/document/src/tests/fieldsettest.cpp b/document/src/tests/fieldsettest.cpp
index 3711ff05535..55bf480da8c 100644
--- a/document/src/tests/fieldsettest.cpp
+++ b/document/src/tests/fieldsettest.cpp
@@ -7,6 +7,7 @@
#include <vespa/document/datatype/annotationreferencedatatype.h>
#include <vespa/document/repo/configbuilder.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <algorithm>
diff --git a/document/src/tests/primitivefieldvaluetest.cpp b/document/src/tests/primitivefieldvaluetest.cpp
index 3d74c9e539b..c4cdc16c3ba 100644
--- a/document/src/tests/primitivefieldvaluetest.cpp
+++ b/document/src/tests/primitivefieldvaluetest.cpp
@@ -5,6 +5,7 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/document/util/bytebuffer.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <limits>
using vespalib::nbostream;
diff --git a/document/src/tests/serialization/annotationserializer_test.cpp b/document/src/tests/serialization/annotationserializer_test.cpp
index 317b090c671..fef5a3b31e5 100644
--- a/document/src/tests/serialization/annotationserializer_test.cpp
+++ b/document/src/tests/serialization/annotationserializer_test.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/serialization/annotationserializer.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/fastos/file.h>
diff --git a/document/src/tests/serialization/vespadocumentserializer_test.cpp b/document/src/tests/serialization/vespadocumentserializer_test.cpp
index 57481666f28..c12a4966bcb 100644
--- a/document/src/tests/serialization/vespadocumentserializer_test.cpp
+++ b/document/src/tests/serialization/vespadocumentserializer_test.cpp
@@ -31,6 +31,7 @@
#include <vespa/document/predicate/predicate_slime_builder.h>
#include <vespa/document/repo/configbuilder.h>
#include <vespa/document/repo/fixedtyperepo.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/serialization/util.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
diff --git a/document/src/tests/struct_anno/struct_anno_test.cpp b/document/src/tests/struct_anno/struct_anno_test.cpp
index 32d880c50c3..0b600fcb236 100644
--- a/document/src/tests/struct_anno/struct_anno_test.cpp
+++ b/document/src/tests/struct_anno/struct_anno_test.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/serialization/annotationserializer.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/fastos/file.h>
diff --git a/document/src/tests/structfieldvaluetest.cpp b/document/src/tests/structfieldvaluetest.cpp
index 9fffe1d630f..0d78e7c0b5c 100644
--- a/document/src/tests/structfieldvaluetest.cpp
+++ b/document/src/tests/structfieldvaluetest.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/repo/configbuilder.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/document/src/tests/testxml.cpp b/document/src/tests/testxml.cpp
index fc398eb28a2..76cb13c78e9 100644
--- a/document/src/tests/testxml.cpp
+++ b/document/src/tests/testxml.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/update/removevalueupdate.h>
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/text/stringtokenizer.h>
#include <vespa/vespalib/testkit/test_kit.h>
diff --git a/document/src/tests/weightedsetfieldvaluetest.cpp b/document/src/tests/weightedsetfieldvaluetest.cpp
index 745bc2dfa67..b99dd07f5c5 100644
--- a/document/src/tests/weightedsetfieldvaluetest.cpp
+++ b/document/src/tests/weightedsetfieldvaluetest.cpp
@@ -6,6 +6,7 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/document/util/bytebuffer.h>
+#include <vespa/document/repo/documenttyperepo.h>
using vespalib::nbostream;
diff --git a/document/src/vespa/document/base/testdocman.cpp b/document/src/vespa/document/base/testdocman.cpp
index 206ac018248..0330a00c36a 100644
--- a/document/src/vespa/document/base/testdocman.cpp
+++ b/document/src/vespa/document/base/testdocman.cpp
@@ -3,6 +3,7 @@
#include "testdocman.h"
#include "exceptions.h"
#include <vespa/document/datatype/datatypes.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <boost/random.hpp>
#include <sstream>
diff --git a/document/src/vespa/document/fieldvalue/document.cpp b/document/src/vespa/document/fieldvalue/document.cpp
index acbb2e800cb..47366b388a9 100644
--- a/document/src/vespa/document/fieldvalue/document.cpp
+++ b/document/src/vespa/document/fieldvalue/document.cpp
@@ -4,6 +4,7 @@
#include <vespa/document/datatype/documenttype.h>
#include <vespa/vespalib/util/crc.h>
#include <vespa/document/repo/fixedtyperepo.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/document/serialization/vespadocumentserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
index 2526976f69d..8f5e2d1dbe3 100644
--- a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
@@ -4,6 +4,7 @@
#include "fieldvaluewriter.h"
#include "document.h"
#include <vespa/document/repo/fixedtyperepo.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/crc.h>
diff --git a/document/src/vespa/document/repo/fixedtyperepo.cpp b/document/src/vespa/document/repo/fixedtyperepo.cpp
index cb27f81dd81..7644dddb64d 100644
--- a/document/src/vespa/document/repo/fixedtyperepo.cpp
+++ b/document/src/vespa/document/repo/fixedtyperepo.cpp
@@ -1,14 +1,38 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "fixedtyperepo.h"
+#include "documenttyperepo.h"
#include <cassert>
namespace document {
+FixedTypeRepo::FixedTypeRepo(const DocumentTypeRepo &repo)
+ : _repo(&repo), _doc_type(repo.getDocumentType(DataType::T_DOCUMENT))
+{
+}
+
FixedTypeRepo::FixedTypeRepo(const DocumentTypeRepo &repo,
const vespalib::string &type)
: _repo(&repo), _doc_type(repo.getDocumentType(type)) {
assert(_doc_type);
}
+const DataType *
+FixedTypeRepo::getDataType(int32_t id) const
+{
+ return _repo->getDataType(*_doc_type, id);
+}
+
+const DataType *
+FixedTypeRepo::getDataType(const vespalib::string &name) const
+{
+ return _repo->getDataType(*_doc_type, name);
+}
+
+const AnnotationType *
+FixedTypeRepo::getAnnotationType(int32_t id) const
+{
+ return _repo->getAnnotationType(*_doc_type, id);
+}
+
} // namespace document
diff --git a/document/src/vespa/document/repo/fixedtyperepo.h b/document/src/vespa/document/repo/fixedtyperepo.h
index e193945393d..eb8a5a328dd 100644
--- a/document/src/vespa/document/repo/fixedtyperepo.h
+++ b/document/src/vespa/document/repo/fixedtyperepo.h
@@ -2,11 +2,13 @@
#pragma once
-#include "documenttyperepo.h"
#include <vespa/document/datatype/datatype.h>
namespace document {
+class DocumentTypeRepo;
+class AnnotationType;
+
// Combines a DocumentTypeRepo and a DocumentType to allow easy access
// to the types contained in the DocumentType's namespace.
class FixedTypeRepo {
@@ -14,18 +16,14 @@ class FixedTypeRepo {
const DocumentType *_doc_type;
public:
- explicit FixedTypeRepo(const DocumentTypeRepo &repo)
- : _repo(&repo), _doc_type(repo.getDocumentType(DataType::T_DOCUMENT)) { }
+ explicit FixedTypeRepo(const DocumentTypeRepo &repo);
FixedTypeRepo(const DocumentTypeRepo &repo, const DocumentType &doc_type)
: _repo(&repo), _doc_type(&doc_type) {}
FixedTypeRepo(const DocumentTypeRepo &repo, const vespalib::string &type);
- const DataType *getDataType(int32_t id) const
- { return _repo->getDataType(*_doc_type, id); }
- const DataType *getDataType(const vespalib::string &name) const
- { return _repo->getDataType(*_doc_type, name); }
- const AnnotationType *getAnnotationType(int32_t id) const
- { return _repo->getAnnotationType(*_doc_type, id); }
+ const DataType *getDataType(int32_t id) const;
+ const DataType *getDataType(const vespalib::string &name) const;
+ const AnnotationType *getAnnotationType(int32_t id) const;
const DocumentTypeRepo &getDocumentTypeRepo() const { return *_repo; }
const DocumentType &getDocumentType() const { return *_doc_type; }
diff --git a/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp b/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp
index 0439d16c25d..399cadb4c7d 100644
--- a/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp
+++ b/document/src/vespa/document/serialization/vespadocumentdeserializer.cpp
@@ -18,6 +18,7 @@
#include <vespa/document/fieldvalue/weightedsetfieldvalue.h>
#include <vespa/document/fieldvalue/tensorfieldvalue.h>
#include <vespa/document/fieldvalue/referencefieldvalue.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/data/slime/binary_format.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/stllike/asciistream.h>
diff --git a/document/src/vespa/document/serialization/vespadocumentserializer.cpp b/document/src/vespa/document/serialization/vespadocumentserializer.cpp
index 919f02a5fee..d8d18969070 100644
--- a/document/src/vespa/document/serialization/vespadocumentserializer.cpp
+++ b/document/src/vespa/document/serialization/vespadocumentserializer.cpp
@@ -21,6 +21,7 @@
#include <vespa/document/fieldvalue/tensorfieldvalue.h>
#include <vespa/document/fieldvalue/referencefieldvalue.h>
#include <vespa/document/datatype/weightedsetdatatype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/updates.h>
#include <vespa/document/update/fieldpathupdates.h>
#include <vespa/vespalib/data/slime/binary_format.h>
diff --git a/document/src/vespa/document/update/documentupdate.cpp b/document/src/vespa/document/update/documentupdate.cpp
index 717df16e62c..fa289ab0bfa 100644
--- a/document/src/vespa/document/update/documentupdate.cpp
+++ b/document/src/vespa/document/update/documentupdate.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/util/bufferexceptions.h>
#include <vespa/document/base/exceptions.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/util/xmlstream.h>
using vespalib::IllegalArgumentException;
diff --git a/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp b/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
index 67542afd12f..2a9395767af 100644
--- a/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
+++ b/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
@@ -2,6 +2,7 @@
#include "memfiletestutils.h"
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/persistence/spi/test.h>
using document::DocumentType;
diff --git a/memfilepersistence/src/tests/spi/memfiletestutils.cpp b/memfilepersistence/src/tests/spi/memfiletestutils.cpp
index cd14e989220..9571d880e9f 100644
--- a/memfilepersistence/src/tests/spi/memfiletestutils.cpp
+++ b/memfilepersistence/src/tests/spi/memfiletestutils.cpp
@@ -6,6 +6,7 @@
#include <tests/spi/simulatedfailurefile.h>
#include <vespa/memfilepersistence/memfile/memfilecache.h>
#include <vespa/document/update/assignvalueupdate.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/persistence/spi/test.h>
#include <vespa/vespalib/objects/nbostream.h>
diff --git a/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp b/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp
index dccfb8ab5c1..7701df98661 100644
--- a/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp
+++ b/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <tests/spi/memfiletestutils.h>
#include <tests/spi/options_builder.h>
diff --git a/persistence/src/tests/dummyimpl/dummyimpltest.cpp b/persistence/src/tests/dummyimpl/dummyimpltest.cpp
index 915d3e6a4b2..54876b01b81 100644
--- a/persistence/src/tests/dummyimpl/dummyimpltest.cpp
+++ b/persistence/src/tests/dummyimpl/dummyimpltest.cpp
@@ -3,6 +3,7 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/persistence/conformancetest/conformancetest.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
+#include <vespa/document/repo/documenttyperepo.h>
namespace storage {
namespace spi {
diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
index 7f4ea9dcc2e..2a215b099b6 100644
--- a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
+++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp
@@ -7,6 +7,7 @@
#include <vespa/document/fieldset/fieldsets.h>
#include <vespa/document/update/documentupdate.h>
#include <vespa/document/update/assignvalueupdate.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/metrics/loadmetric.h>
#include <vespa/vdslib/state/state.h>
diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.h b/persistence/src/vespa/persistence/conformancetest/conformancetest.h
index bf63508693f..de6430c750a 100644
--- a/persistence/src/vespa/persistence/conformancetest/conformancetest.h
+++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.h
@@ -8,7 +8,6 @@
*/
#pragma once
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/persistence/spi/persistenceprovider.h>
#include <vespa/vdstestlib/cppunit/macros.h>
@@ -64,21 +63,25 @@
namespace document
{
+class DocumentTypeRepo;
class TestDocMan;
}
+namespace document::internal { class InternalDocumenttypesType; }
+
namespace storage {
namespace spi {
struct ConformanceTest : public CppUnit::TestFixture {
struct PersistenceFactory {
typedef std::unique_ptr<PersistenceFactory> UP;
+ using DocumenttypesConfig = const document::internal::InternalDocumenttypesType;
virtual ~PersistenceFactory() {}
virtual PersistenceProvider::UP getPersistenceImplementation(
const std::shared_ptr<const document::DocumentTypeRepo> &repo,
- const document::DocumentTypeRepo::DocumenttypesConfig &typesCfg) = 0;
+ const DocumenttypesConfig &typesCfg) = 0;
virtual void
clear(void)
diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
index deb0ece98bd..c93b7fd22c7 100644
--- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
+++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.h
@@ -9,7 +9,6 @@
#pragma once
#include <vespa/persistence/spi/abstractpersistenceprovider.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/base/globalid.h>
#include <vespa/document/fieldset/fieldsets.h>
#include <vespa/vespalib/util/sync.h>
@@ -18,6 +17,7 @@
#include <map>
namespace document {
+class DocumentTypeRepo;
class FieldSet;
namespace select { class Node; }
}
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp
index ea18f513535..828ca384bc5 100644
--- a/searchcore/src/apps/tests/persistenceconformance_test.cpp
+++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp
@@ -9,6 +9,7 @@
#include <vespa/document/base/testdocman.h>
#include <vespa/fastos/file.h>
#include <vespa/persistence/conformancetest/conformancetest.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcommon/common/schemaconfigurer.h>
#include <vespa/searchcore/proton/common/hw_info.h>
diff --git a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
index e63f8e1a57a..7488fc633fd 100644
--- a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
+++ b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp
@@ -4,6 +4,7 @@
#include <vespa/config/print/fileconfigwriter.h>
#include <vespa/document/config/config-documenttypes.h>
#include <vespa/document/document.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/documentapi/documentapi.h>
#include <vespa/documentapi/loadtypes/loadtypeset.h>
#include <vespa/messagebus/destinationsession.h>
diff --git a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
index de29c2fcf12..4c4027da6d6 100644
--- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
+++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
@@ -7,6 +7,7 @@
#include <vespa/document/fieldvalue/stringfieldvalue.h>
#include <vespa/document/fieldvalue/referencefieldvalue.h>
#include <vespa/document/fieldvalue/weightedsetfieldvalue.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/addvalueupdate.h>
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/update/clearvalueupdate.h>
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index e6abb4f6c51..7eae1c9d12d 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -5,6 +5,7 @@
#include <vespa/eval/tensor/default_tensor.h>
#include <vespa/eval/tensor/serialization/typed_binary_format.h>
#include <vespa/eval/tensor/tensor_factory.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/attribute_writer.h>
#include <vespa/searchcore/proton/test/bucketfactory.h>
diff --git a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
index b3b05d03b9f..57bddd6aede 100644
--- a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
+++ b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/fieldset/fieldsets.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/persistence/spi/bucket.h>
#include <vespa/persistence/spi/docentry.h>
#include <vespa/persistence/spi/result.h>
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 60cbfeb29b9..15ab8f90ac9 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -2,6 +2,7 @@
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchcore/proton/attribute/attribute_writer.h>
#include <vespa/searchcore/proton/attribute/attributemanager.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index 14a0dc89b65..51ecc6ab0a1 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -2,6 +2,7 @@
#include <tests/proton/common/dummydbowner.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/fastos/file.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/flushableattribute.h>
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
index 3cd4598d8a7..ce07858ea0b 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp
@@ -1,5 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchcore/proton/server/documentdbconfig.h>
#include <vespa/searchcore/proton/server/documentdbconfigscout.h>
#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
index a04e340c96f..581db62fce5 100644
--- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
@@ -8,6 +8,7 @@
#include <vespa/config-summary.h>
#include <vespa/config-summarymap.h>
#include <vespa/config/helper/configgetter.hpp>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchcore/proton/server/bootstrapconfig.h>
#include <vespa/searchcore/proton/server/fileconfigmanager.h>
#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 9810b7243a5..0f17577e789 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1,5 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
#include <vespa/searchcore/proton/attribute/i_attribute_manager.h>
diff --git a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
index 96f742a172c..2817ddb1b85 100644
--- a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
+++ b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
@@ -7,6 +7,7 @@
#include <vespa/config-rank-profiles.h>
#include <vespa/config-summary.h>
#include <vespa/config-summarymap.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/fileacquirer/config-filedistributorrpc.h>
#include <vespa/searchcore/proton/server/bootstrapconfig.h>
#include <vespa/searchcore/proton/server/bootstrapconfigmanager.h>
diff --git a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
index 9de850b37ec..b87d8bc302f 100644
--- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
+++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
@@ -7,6 +7,7 @@
#include <vespa/config-rank-profiles.h>
#include <vespa/config-summary.h>
#include <vespa/config-summarymap.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/fileacquirer/config-filedistributorrpc.h>
#include <vespa/searchcore/proton/server/bootstrapconfig.h>
#include <vespa/searchcore/proton/server/bootstrapconfigmanager.h>
diff --git a/searchcore/src/tests/proton/server/visibility_handler/CMakeLists.txt b/searchcore/src/tests/proton/server/visibility_handler/CMakeLists.txt
index b087fa36b9c..cb79d0fae8a 100644
--- a/searchcore/src/tests/proton/server/visibility_handler/CMakeLists.txt
+++ b/searchcore/src/tests/proton/server/visibility_handler/CMakeLists.txt
@@ -4,5 +4,6 @@ vespa_add_executable(searchcore_visibility_handler_test_app TEST
visibility_handler_test.cpp
DEPENDS
searchcore_server
+ searchcore_test
)
vespa_add_test(NAME searchcore_visibility_handler_test_app COMMAND searchcore_visibility_handler_test_app)
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
index 4f3e7bf538b..83d24e1b92b 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchsummary/config/config-juniperrc.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
#include <vespa/searchlib/docstore/idocumentstore.h>
@@ -12,6 +11,8 @@
#include <vespa/config-summary.h>
#include <vespa/config-summarymap.h>
+namespace document { class DocumentTypeRepo; }
+
namespace proton {
/**
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index 6636552b695..ead5c1d1ddf 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -5,6 +5,7 @@
#include "summaryflushtarget.h"
#include "summarymanager.h"
#include <vespa/config/print/ostreamconfigwriter.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/juniper/rpinterface.h>
#include <vespa/searchcorespi/index/i_thread_service.h>
#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
index f6bd8cced6f..c5acd483448 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
@@ -10,7 +10,6 @@
#include <vespa/searchlib/docstore/logdocumentstore.h>
#include <vespa/searchlib/transactionlog/syncproxy.h>
#include <vespa/document/fieldvalue/document.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/fastlib/text/normwordfolder.h>
diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h
index a3efbb227be..e44b7874c12 100644
--- a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h
+++ b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h
@@ -1,10 +1,11 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchlib/common/serialnum.h>
#include <vespa/vespalib/objects/nbostream.h>
+namespace document { class DocumentTypeRepo; }
+
namespace proton {
class FeedOperation
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
index bdad8c31337..e59b73eaf50 100644
--- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
+++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h
@@ -6,7 +6,6 @@
#include <vespa/searchcore/proton/common/hw_info.h>
#include <vespa/searchcore/config/config-proton.h>
#include <vespa/document/config/config-documenttypes.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchlib/common/tunefileinfo.h>
#include <vespa/config/retriever/configsnapshot.h>
#include <vespa/fileacquirer/config-filedistributorrpc.h>
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 73dfedeb867..55daad7abbd 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -11,6 +11,7 @@
#include "maintenance_jobs_injector.h"
#include "reconfig_params.h"
#include "bootstrapconfig.h"
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchcore/proton/metrics/executor_threading_service_stats.h>
#include <vespa/searchcore/proton/attribute/attribute_writer.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
index c3bc7fbed45..d5a9b09ead7 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp
@@ -9,6 +9,7 @@
#include <vespa/config-summarymap.h>
#include <vespa/searchsummary/config/config-juniperrc.h>
#include <vespa/document/config/config-documenttypes.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchcore/config/config-ranking-constants.h>
#include <vespa/searchcore/proton/attribute/attribute_aspect_delayer.h>
#include <vespa/searchcore/proton/common/document_type_inspector.h>
@@ -293,4 +294,11 @@ DocumentDBConfig::makeDelayedAttributeAspectConfig(const SP &newCfg, const Docum
return result;
}
+const document::DocumentType *
+DocumentDBConfig::getDocumentType() const
+{
+ return _repo->getDocumentType(getDocTypeName());
+}
+
+
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
index e5010d7a782..df44c6c09e6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h
@@ -3,7 +3,6 @@
#pragma once
#include "document_db_maintenance_config.h"
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchlib/common/tunefileinfo.h>
#include <vespa/searchcommon/common/schema.h>
#include <vespa/searchcore/proton/matching/ranking_constants.h>
@@ -21,7 +20,8 @@ namespace vespa::config::search::internal {
}
namespace vespa::config::search::summary { namespace internal { class InternalJuniperrcType; } }
-namespace document { namespace internal { class InternalDocumenttypesType; } }
+namespace document { class DocumentTypeRepo; }
+namespace document::internal { class InternalDocumenttypesType; }
namespace proton {
@@ -184,7 +184,7 @@ public:
const JuniperrcConfigSP &getJuniperrcConfigSP() const { return _juniperrc; }
const DocumenttypesConfigSP &getDocumenttypesConfigSP() const { return _documenttypes; }
const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepoSP() const { return _repo; }
- const document::DocumentType *getDocumentType() const { return _repo->getDocumentType(getDocTypeName()); }
+ const document::DocumentType *getDocumentType() const;
const ImportedFieldsConfig &getImportedFieldsConfig() const { return *_importedFields; }
const ImportedFieldsConfigSP &getImportedFieldsConfigSP() const { return _importedFields; }
const search::index::Schema::SP &getSchemaSP() const { return _schema; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
index c60372c6253..7d8b2ef26bb 100644
--- a/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
+++ b/searchcore/src/vespa/searchcore/proton/server/minimal_document_retriever.h
@@ -3,7 +3,6 @@
#pragma once
#include "documentretrieverbase.h"
-#include <vespa/document/repo/documenttyperepo.h>
namespace search { class IDocumentStore; }
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 3364b470ee0..d152fb1e2e1 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -21,6 +21,7 @@
#include <vespa/searchcommon/common/schemaconfigurer.h>
#include <vespa/document/base/exceptions.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/util/closuretask.h>
#include <vespa/vespalib/util/host_name.h>
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
index c793ba815d2..058c08b1ab4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h
@@ -13,7 +13,6 @@
#include <vespa/searchcore/proton/index/i_index_writer.h>
#include <vespa/searchcore/proton/matching/constant_value_repo.h>
#include <vespa/searchcore/proton/reprocessing/i_reprocessing_initializer.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchsummary/config/config-juniperrc.h>
#include <vespa/searchcommon/common/schema.h>
#include <vespa/config-attributes.h>
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
index 33e8708799f..fdaf07dc466 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
@@ -13,6 +13,7 @@
#include <vespa/searchcore/proton/documentmetastore/ilidreusedelayer.h>
#include <vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/log/log.h>
diff --git a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
index 10fd4b9c518..77a0ca98e0d 100644
--- a/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
+++ b/searchcore/src/vespa/searchcore/proton/test/CMakeLists.txt
@@ -5,6 +5,7 @@ vespa_add_library(searchcore_test STATIC
buckethandler.cpp
clusterstatehandler.cpp
documentdb_config_builder.cpp
+ dummy_feed_view.cpp
userdocumentsbuilder.cpp
DEPENDS
searchcore_fconfig
diff --git a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
index 2bfbbf97001..5cd092d20ba 100644
--- a/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
+++ b/searchcore/src/vespa/searchcore/proton/test/documentdb_config_builder.cpp
@@ -6,6 +6,7 @@
#include <vespa/config-rank-profiles.h>
#include <vespa/config-attributes.h>
#include <vespa/config-indexschema.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/searchsummary/config/config-juniperrc.h>
#include <vespa/document/config/config-documenttypes.h>
#include <vespa/config-imported-fields.h>
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp
new file mode 100644
index 00000000000..fd2df6577d7
--- /dev/null
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp
@@ -0,0 +1,20 @@
+// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "dummy_feed_view.h"
+#include <vespa/document/repo/documenttyperepo.h>
+
+namespace proton::test {
+
+DummyFeedView::DummyFeedView()
+ : _docTypeRepo()
+{
+}
+
+DummyFeedView::DummyFeedView(const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo)
+ : _docTypeRepo(docTypeRepo)
+{
+}
+
+DummyFeedView::~DummyFeedView() = default;
+
+}
diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
index fd15e09bcd0..36079da73c7 100644
--- a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
+++ b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h
@@ -2,7 +2,6 @@
#pragma once
#include <vespa/searchcore/proton/server/ifeedview.h>
-#include <vespa/document/repo/documenttyperepo.h>
namespace proton::test {
@@ -10,12 +9,9 @@ struct DummyFeedView : public IFeedView
{
std::shared_ptr<const document::DocumentTypeRepo> _docTypeRepo;
- DummyFeedView()
- : _docTypeRepo()
- {}
- DummyFeedView(const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo)
- : _docTypeRepo(docTypeRepo)
- {}
+ DummyFeedView();
+ DummyFeedView(const std::shared_ptr<const document::DocumentTypeRepo> &docTypeRepo);
+ virtual ~DummyFeedView() override;
const std::shared_ptr<const document::DocumentTypeRepo> &getDocumentTypeRepo() const override {
return _docTypeRepo;
}
diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.cpp b/searchlib/src/vespa/searchlib/index/docbuilder.cpp
index f67bc1b8177..67c82b92baf 100644
--- a/searchlib/src/vespa/searchlib/index/docbuilder.cpp
+++ b/searchlib/src/vespa/searchlib/index/docbuilder.cpp
@@ -2,6 +2,7 @@
#include "docbuilder.h"
#include <vespa/document/datatype/urldatatype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/fastlib/text/unicodeutil.h>
#include <vespa/vespalib/geo/zcurve.h>
#include <vespa/vespalib/text/utf8.h>
diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.h b/searchlib/src/vespa/searchlib/index/docbuilder.h
index f83f784a621..1d170483783 100644
--- a/searchlib/src/vespa/searchlib/index/docbuilder.h
+++ b/searchlib/src/vespa/searchlib/index/docbuilder.h
@@ -9,7 +9,6 @@
#include <vespa/document/annotation/span.h>
#include <vespa/document/annotation/spanlist.h>
#include <vespa/document/annotation/spantree.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/util/exception.h>
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/storage/src/tests/distributor/externaloperationhandlertest.cpp b/storage/src/tests/distributor/externaloperationhandlertest.cpp
index 8276e38997f..fea4ae15efc 100644
--- a/storage/src/tests/distributor/externaloperationhandlertest.cpp
+++ b/storage/src/tests/distributor/externaloperationhandlertest.cpp
@@ -5,6 +5,7 @@
#include <vespa/storage/distributor/distributor.h>
#include <vespa/storage/distributor/distributormetricsset.h>
#include <vespa/storageapi/message/persistence.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
using document::test::makeDocumentBucket;
diff --git a/storage/src/tests/distributor/updateoperationtest.cpp b/storage/src/tests/distributor/updateoperationtest.cpp
index ccbee0093ba..9de304db497 100644
--- a/storage/src/tests/distributor/updateoperationtest.cpp
+++ b/storage/src/tests/distributor/updateoperationtest.cpp
@@ -7,6 +7,7 @@
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/bucket.h>
#include <tests/distributor/distributortestutil.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/operations/external/updateoperation.h>
#include <vespa/vespalib/testkit/test_kit.h>
diff --git a/storage/src/tests/persistence/common/filestortestfixture.cpp b/storage/src/tests/persistence/common/filestortestfixture.cpp
index 4e2ddeb9616..c92687f798b 100644
--- a/storage/src/tests/persistence/common/filestortestfixture.cpp
+++ b/storage/src/tests/persistence/common/filestortestfixture.cpp
@@ -4,6 +4,7 @@
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/spi/test.h>
#include <sstream>
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index 26bfeb41b42..c786f0bbaa8 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -4,6 +4,7 @@
#include <tests/common/storagelinktest.h>
#include <tests/common/teststorageapp.h>
#include <tests/persistence/filestorage/forwardingmessagesender.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/storageserver/statemanager.h>
#include <vespa/storage/bucketdb/bucketmanager.h>
diff --git a/storage/src/tests/persistence/persistencetestutils.cpp b/storage/src/tests/persistence/persistencetestutils.cpp
index d46708b3aaa..2e382444d4c 100644
--- a/storage/src/tests/persistence/persistencetestutils.cpp
+++ b/storage/src/tests/persistence/persistencetestutils.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/datatype/documenttype.h>
#include <vespa/storageapi/message/persistence.h>
#include <tests/persistence/persistencetestutils.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/persistence/spi/test.h>
diff --git a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
index 0fa7fddbb12..170b5385f72 100644
--- a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
+++ b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
@@ -12,6 +12,7 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/storageserver/changedbucketownershiphandler.h>
diff --git a/storage/src/tests/storageserver/documentapiconvertertest.cpp b/storage/src/tests/storageserver/documentapiconvertertest.cpp
index 1c38107cb06..695ae17c5d4 100644
--- a/storage/src/tests/storageserver/documentapiconvertertest.cpp
+++ b/storage/src/tests/storageserver/documentapiconvertertest.cpp
@@ -5,6 +5,7 @@
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/bucket/bucketidfactory.h>
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/select/parser.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/documentapi/documentapi.h>
diff --git a/storage/src/vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h b/storage/src/vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h
index a3b6b58e806..1621f4e71f3 100644
--- a/storage/src/vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h
+++ b/storage/src/vespa/storage/frameworkimpl/component/storagecomponentregisterimpl.h
@@ -8,7 +8,6 @@
#pragma once
#include <vespa/document/bucket/bucketidfactory.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/documentapi/loadtypes/loadtypeset.h>
#include <vespa/storage/common/storagecomponent.h>
#include <vespa/config-bucketspaces.h>
diff --git a/storage/src/vespa/storage/storageserver/documentapiconverter.h b/storage/src/vespa/storage/storageserver/documentapiconverter.h
index eef37467c93..4587d9eb122 100644
--- a/storage/src/vespa/storage/storageserver/documentapiconverter.h
+++ b/storage/src/vespa/storage/storageserver/documentapiconverter.h
@@ -3,7 +3,6 @@
#include <vespa/documentapi/messagebus/messages/documentmessage.h>
#include <vespa/documentapi/messagebus/messages/documentreply.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <mutex>
namespace config { class ConfigUri; }
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
index c27bdfe2013..e7d80a0614f 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization.h
@@ -2,7 +2,6 @@
#pragma once
#include <vespa/document/bucket/bucket.h>
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/messagebus/routable.h>
#include <vespa/storageapi/mbusprot/storagemessage.h>
#include <vespa/storageapi/message/bucket.h>
diff --git a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization6_0.h b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization6_0.h
index c24873f5e57..5c4e6b2ec63 100644
--- a/storageapi/src/vespa/storageapi/mbusprot/protocolserialization6_0.h
+++ b/storageapi/src/vespa/storageapi/mbusprot/protocolserialization6_0.h
@@ -3,7 +3,6 @@
#pragma once
#include "protocolserialization5_2.h"
-#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/documentapi/loadtypes/loadtypeset.h>
namespace storage {
diff --git a/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
index 16a5d99d2b2..b419206fede 100644
--- a/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
+++ b/streamingvisitors/src/tests/searchvisitor/searchvisitor.cpp
@@ -1,5 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/document/base/testdocrepo.h>
+#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/query/tree/querybuilder.h>
#include <vespa/searchlib/query/tree/simplequery.h>