databend icon indicating copy to clipboard operation
databend copied to clipboard

chore: reorg workspace, a basic structure

Open PsiACE opened this issue 3 years ago • 12 comments

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

In this PR

  • Splitting binary targets and shared libraries.
    • move fuzz to query/ast
    • move metabench, metactl to cmds
  • A clean root dir structure, all crates in src dir.
    • move databend-query to query/service
    • move databend-meta to meta/service
  • Almost all meta-related crates are categorised
    • move common/meta, common/protos, common/proto-conv to meta.
    • add a README.md to meta dir
  • edit makefile, codeowner and docs

Related #7050

PsiACE avatar Aug 10 '22 16:08 PsiACE

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Aug 13, 2022 at 3:04AM (UTC)

vercel[bot] avatar Aug 10 '22 16:08 vercel[bot]

targets have different meanings in rust, and it seems we don't need to add an extra layer.

How about renaming cmds to bianries?

binaries
  - query
  - meta
  - metabench
  - metactl

Xuanwo avatar Aug 11 '22 00:08 Xuanwo

Rename common to components? Or we will do this in the next parts?

Xuanwo avatar Aug 11 '22 00:08 Xuanwo

Rename common to components? Or we will do this in the next parts?

we will do this in the next parts

targets have different meanings in rust, and it seems we don't need to add an extra layer.

:+1:

How about renaming cmds to bianries?

cargo install databend-bianries ?

PsiACE avatar Aug 11 '22 00:08 PsiACE

cargo install databend-bianries ?

I guess we should only upload libs to crates.io. Binaries are so large that not suitable for users to cargo install them directly.

Xuanwo avatar Aug 11 '22 00:08 Xuanwo

This is a monster PR! Can we split into more than one PR? The layout change will block many other PRs, and other PRs will block this PR too.

bohutang avatar Aug 11 '22 00:08 bohutang

I guess we should only upload libs to crates.io. Binaries are so large that not suitable for users to cargo install them directly.

It has now been renamed, but I still think it can be published to crates.io, which just means that users will need to compile it themselves.

PsiACE avatar Aug 11 '22 00:08 PsiACE

This is a monster PR! Can we split into more than one PR? The layout change will block many other PRs, and other PRs will block this PR too.

Most works are just renaming. git is smart enough to merge them without conflicts (I guess).

Xuanwo avatar Aug 11 '22 00:08 Xuanwo

This is a monster PR! Can we split into more than one PR? The layout change will block many other PRs, and other PRs will block this PR too.

Most works are just renaming. git is smart enough to merge them without conflicts (I guess).

Yes, most of the time it is easy to avoid file conflicts by simply running git pull once.

As we plan to introduce layout changes, I think it will be difficult to avoid blocking each other.

PsiACE avatar Aug 11 '22 01:08 PsiACE

Almost LGTM. I suggest merging this PR on the weekend or when PR numbers are low, not blocking other PRs which is working.

bohutang avatar Aug 11 '22 01:08 bohutang

Ooops, there are many conflicts. Git is not smart enough :cry:

Xuanwo avatar Aug 11 '22 01:08 Xuanwo

I suggest merging this PR on the weekend or when PR numbers are low, not blocking other PRs which is working.

I marked it as a draft to avoid merging at an unexpected time.

Ooops, there are many conflicts. Git is not smart enough

emmm, It requires manual confirmation of the merge. But the fact is that hardly anything has to be modified.

PsiACE avatar Aug 11 '22 02:08 PsiACE

This PR shows how frequently we change our code (just in one day)...

Xuanwo avatar Aug 12 '22 05:08 Xuanwo

cc @PsiACE, Let's try merge this PR today!

Xuanwo avatar Aug 13 '22 02:08 Xuanwo

Github is more stupid than Git.

git merge works excellent, but GitHub marks it as conflicts.

Xuanwo avatar Aug 13 '22 03:08 Xuanwo