Skip to content

docs: clarify the installer already inits the current project (#826)#883

Open
Dashsoap wants to merge 1 commit into
colbymchenry:mainfrom
Dashsoap:docs/clarify-quickstart-init
Open

docs: clarify the installer already inits the current project (#826)#883
Dashsoap wants to merge 1 commit into
colbymchenry:mainfrom
Dashsoap:docs/clarify-quickstart-init

Conversation

@Dashsoap

Copy link
Copy Markdown

Fixes #826.

What

The Quick Start lists codegraph init as step 3 as if it were always required after install. This clarifies that the interactive installer already initializes the project it is run in, so step 3 only applies to other projects.

Why

Step 1 of the same Quick Start already documents that the installer will:

  • Initialize your current project (local installs only)

This is real — src/installer/index.ts runs initializeLocalProject() on a local install, which calls CodeGraph.init() + indexAll():

// Step 6: for local install, initialize the project.
await initializeLocalProject(clack, useDefaults);

So a user who follows the steps literally runs codegraph init (step 3) in the same project the installer just initialized, and gets:

Already initialized in /path/to/project
Use "codegraph index" to re-index or "codegraph sync" to update

That is exactly what the reporter hit in #826. This is a docs-only clarification:

 ### 3. Initialize Projects
+
+The interactive installer in step 1 already initializes **the project you ran it in**
+(it runs `codegraph init` for you on a local install ...). For that project you can
+skip straight to step 2.
+
+To index **other** projects, run `codegraph init` in each one:

 cd your-project
 codegraph init

No code change.

…olbymchenry#826)

The Quick Start lists 'codegraph init' as step 3 as if it were always
required, but step 1's installer already initializes the project it's
run in (src/installer/index.ts initializeLocalProject -> CodeGraph.init
+ indexAll on a local install). Users who follow the steps literally hit
'Already initialized ...' when they re-run init in that same project
(reported in colbymchenry#826).

Clarify that step 3's 'codegraph init' is for OTHER projects, and that
the project the installer ran in is already indexed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Interactive installer already initializes the project, docs still suggest running codegraph init -i separately

1 participant