Giter VIP home page Giter VIP logo

Comments (3)

russcam avatar russcam commented on August 22, 2024 1

++ this would be helpful.

What would also be useful is if the protos included the agreed c# namespace option, for example

# namespace TBC
option csharp_namespace = "Qdrant.Client.Grpc"

which is patched in when downloading in

// add csharp namespace to proto files if they don't contain one
foreach (var file in Directory.EnumerateFiles(protosTagDir))
{
var contents = File.ReadAllLines(file).ToList();
if (contents.Any(line => line.Contains("option csharp_namespace")))
continue;
var index = 0;
for (var i = 0; i < contents.Count; i++)
{
if (contents[i].StartsWith("syntax") ||
contents[i].StartsWith("import") ||
contents[i].StartsWith("package") ||
contents[i].StartsWith("//") ||
string.IsNullOrWhiteSpace(contents[i]))
continue;
index = i;
break;
}
contents.Insert(index, $"option csharp_namespace = \"{project}\";");
File.WriteAllLines(file, contents);
}

from qdrant-dotnet.

generall avatar generall commented on August 22, 2024

Hi @russcam, @roji. We have considered this refactoring a while ago, similar question was raised in similar context:

For example here: qdrant/qdrant#1266

But unfortunately there are quite a few places where this decomposition will disrupt our workflow. There are already set-up processes which rely on current proto structure, and refactoring could easily take months.


As an alternative I propose to take a look at how current clients implement the update process:

There is a very minimal script which can fetch a single sub-directory of qdrant main repo: https://github.com/qdrant/rust-client/blob/master/tools/sync_proto.sh

Versioning is very simple:

the client:master is synced with master of the qdrant/qdrant:master, and client:dev is synced with qdrant/qdrant:dev.
That allows development of the client features before the release of the main project.

It is very easy to setup CI script that would ensure that the repo has latest changes.

When it is time to release, we cherry-pick changes from dev to master and run CI against the latest build.


Regarding c# namespace option, please feel free to PR it into the main repo, I assume it is not going to break any other generators

from qdrant-dotnet.

roji avatar roji commented on August 22, 2024

But unfortunately there are quite a few places where this decomposition will disrupt our workflow. There are already set-up processes which rely on current proto structure, and refactoring could easily take months.

Just to be clear, I'm only suggesting bringing in the proto files - exactly as they are today - via a git submodule; that means that the directory structure and files stay identical to what they are today (i.e. no refactoring within the protos), and just the fetching/refreshing mechanism changes (i.e. you use git to get the right files rather than a script).

But if this would cause issues on your side we can manage the way things are, of course.

from qdrant-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.