Cannot find package github.com/pingcap/tidb

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Cannot find package github.com/pingcap/tidb

| username: JiekerTime

I’ve been reading the documentation official website.
I configured it like this:

mkdir -p .idea/runConfigurations/ && cd .idea/runConfigurations/

cat <<EOF > unistore_4000.xml
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="unistore 4000" type="GoApplicationRunConfiguration" factoryName="Go Application">
    <module name="tidb" />
    <working_directory value="\$PROJECT_DIR\$" />
    <kind value="PACKAGE" />
    <filePath value="\$PROJECT_DIR\$" />
    <package value="github.com/pingcap/tidb/tidb-server" />
    <directory value="\$PROJECT_DIR\$" />
    <method v="2" />
  </configuration>
</component>
EOF

cat <<EOF > playground_attach_4001.xml
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="playground attach 4001" type="GoApplicationRunConfiguration" factoryName="Go Application">
    <module name="tidb" />
    <working_directory value="\$PROJECT_DIR\$" />
    <parameters value="--path=127.0.0.1:2379 --store=tikv --status=10081 -P 4001 " />
    <kind value="PACKAGE" />
    <filePath value="\$PROJECT_DIR\$/tidb-server/main.go" />
    <package value="github.com/pingcap/tidb/tidb-server" />
    <directory value="\$PROJECT_DIR\$" />
    <method v="2" />
  </configuration>
</component>
EOF

cat <<EOF > unit_test.xml
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="unit test" type="GoTestRunConfiguration" factoryName="Go Test">
    <module name="tidb" />
    <working_directory value="\$PROJECT_DIR\$" />
    <go_parameters value="-race -i --tags=intest,deadlock" />
    <framework value="gocheck" />
    <kind value="DIRECTORY" />
    <package value="github.com/pingcap/tidb" />
    <directory value="\$PROJECT_DIR\$/planner/core" />
    <filePath value="\$PROJECT_DIR\$" />
    <pattern value="TestEnforceMPP" />
    <method v="2" />
  </configuration>
</component>
EOF

but my GoLand looks like this:
image

It occurred:
Error: Cannot find package github.com/pingcap/tidb/tidb-server

I’m not sure what’s happening. I tried looking in the go.mod and didn’t find the mod in question. Is the documentation wrong?

| username: ShawnYan | Original post link

Maybe you can refer to this article:

| username: ShawnYan | Original post link

First download the source code and then configure the project.

| username: JiekerTime | Original post link

Hahaha, of course, I’ve already downloaded the source code. That’s why I’m puzzled about why I can’t find the path.

| username: Fly-bird | Original post link

Is the source code fully downloaded?

| username: JiekerTime | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: JiekerTime | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: 有猫万事足 | Original post link

Try changing it to github.com/pingcap/tidb/cmd/tidb-server.

The directory structure has been adjusted, but the configuration documentation might not have been updated yet.

| username: JiekerTime | Original post link

Thank you, the issue has been resolved. I hope the remaining documentation can be updated in the future.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.