Skip to content

Commit f8e6039

Browse files
authored
feat: land the post-v1.6 upstream sync with v1.6.1 corrections (#275)
Ports the audited post-v1.6 upstream correctness fixes with the final forms released in upstream v1.6.1, memoised per-file source facts for the resolver's text gates, a sibling writer.json diagnostic record for the kernel writer lock, and hermetic git fixtures in the pending-state tests. Release notes come from the commit override in the pull request body.
1 parent 79cb21c commit f8e6039

144 files changed

Lines changed: 17206 additions & 1066 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.githooks/pre-push‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@
44
set -euo pipefail
55
repo_root="$(git rev-parse --show-toplevel)"
66
cd "$repo_root"
7+
# Git hands hooks the repository-locating environment (GIT_DIR, GIT_INDEX_FILE,
8+
# ...). Tests create throwaway repositories; inheriting these variables would
9+
# point their commits at THIS repository, so clear them before the gate.
10+
for name in $(git rev-parse --local-env-vars); do
11+
unset "$name"
12+
done
713
echo "==> [pre-push] make pre-ci"
814
exec make pre-ci

‎Cargo.lock‎

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,20 @@ codegraph install --yes --init
182182
codegraph install --target=codex,claude,kiro --yes
183183
```
184184

185+
Global profile overrides are honored: Claude Code follows
186+
`CLAUDE_CONFIG_DIR`, Codex follows `CODEX_HOME`, and OpenCode 2 receives its
187+
native `mcp.servers.codegraph` entry with `codemode: false`. Claude entries set
188+
`alwaysLoad: true`; Copilot CLI entries set `deferTools: "never"` so Explore is
189+
available from the first prompt.
190+
185191
A server launched without `--path` can serve an existing index selected by an
186192
explicit per-call `projectPath`, client roots, or deterministic workspace
187-
adoption. Pin `--path` when a project should be the default rather than
188-
supplied per call.
193+
adoption. First explicit access to an existing index waits for catch-up and
194+
retains that project's shared daemon/watcher; multiple child projects remain
195+
separate and multiple MCP sessions share one writer per project. Pin `--path`
196+
when a project should be the default rather than supplied per call. Explicit
197+
direct mode (`CODEGRAPH_NO_DAEMON=1`) opts out of lazy cross-project daemon
198+
services, permits one direct writer, and rejects a second.
189199

190200
The default visible MCP surface emphasizes exploration, file/symbol reads,
191201
search, and callers. Additional known tools can be enabled with
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
struct AggregateOnly {
2+
int value;
3+
};
4+
5+
class WithConstructor {
6+
public:
7+
WithConstructor() {}
8+
explicit WithConstructor(int value) {}
9+
};
10+
11+
class Defaults {
12+
public:
13+
Defaults() {}
14+
explicit Defaults(int value = 0) {}
15+
};
16+
17+
namespace left {
18+
struct Widget {
19+
Widget() {}
20+
};
21+
}
22+
23+
namespace right {
24+
struct Widget {
25+
Widget() {}
26+
};
27+
}
28+
29+
void aggregate_only() {
30+
AggregateOnly value{};
31+
}
32+
33+
void constructor_default() {
34+
WithConstructor value;
35+
}
36+
37+
void constructor_braced() {
38+
WithConstructor value{};
39+
}
40+
41+
void constructor_value() {
42+
WithConstructor value(1);
43+
}
44+
45+
void constructor_ambiguous_overload() {
46+
Defaults value;
47+
}
48+
49+
void constructor_ambiguous_owner() {
50+
Widget value;
51+
}
52+
53+
void constructor_explicit_owner() {
54+
left::Widget value;
55+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
void reset_profile(void)
2+
{
3+
RESET_CONFIG(profile_t, profile,
4+
.pid = { [0] = 10, [1] = { 50, 75 } },
5+
.limit = 500,
6+
);
7+
}
8+
9+
void after_reset(void)
10+
{
11+
}
12+
13+
int final_value(void)
14+
{
15+
return 1;
16+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class AbstractStore {
2+
public:
3+
virtual int read(int key) = 0;
4+
virtual AbstractStore *clone() = 0;
5+
virtual AbstractStore &operator=(const AbstractStore &) = 0;
6+
int inherited_pure() = 0;
7+
int declaration_only(int key = 0);
8+
int (*callback)(int) = 0;
9+
int data = 0;
10+
};
11+
12+
class DiskStore : public AbstractStore {
13+
public:
14+
int read(int key) override { return key; }
15+
AbstractStore *clone() override { return this; }
16+
};
17+
18+
int fetch_store(AbstractStore *store, int key)
19+
{
20+
return store->read(key);
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace fixture {
2+
const char *source_template = u8R"MARKUP(
3+
DECLARE_THING(
4+
struct Ghost { int value; };
5+
UE_DEPRECATED(
6+
class GHOST_API IgnoredApi {};
7+
float4 position [[position]];
8+
__global__ void ignored_kernel() {}
9+
ignored_kernel<<<1, 1>>>();
10+
)MARKUP";
11+
}
12+
13+
int after_raw_string(int value)
14+
{
15+
return value;
16+
}
17+
18+
int final_after_raw_string(void)
19+
{
20+
return 1;
21+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
extension type MetersT(double value) {
2+
double get km => value / 1000;
3+
4+
void report() {
5+
print(km);
6+
}
7+
}
8+
9+
class Widget {
10+
double get half => 1.0;
11+
}

‎crates/codegraph-bench/fixtures/rust/self_field.rs‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,46 @@ impl Countdown {
9090
}
9191
}
9292
}
93+
94+
pub struct SplitTarget;
95+
96+
impl SplitTarget {
97+
pub fn reset(&mut self) {}
98+
}
99+
100+
pub struct SplitDecoy;
101+
102+
impl SplitDecoy {
103+
pub fn reset(&mut self) {}
104+
105+
pub fn missing(&mut self) {}
106+
}
107+
108+
impl SplitTarget {
109+
pub fn drive(&mut self) {
110+
self.reset();
111+
self.missing();
112+
}
113+
}
114+
115+
pub trait Drive {
116+
fn go(&mut self);
117+
}
118+
119+
pub struct StepDecoy;
120+
121+
impl StepDecoy {
122+
pub fn step(&mut self) {}
123+
}
124+
125+
pub struct Doer;
126+
127+
impl Doer {
128+
pub fn step(&mut self) {}
129+
}
130+
131+
impl Drive for Doer {
132+
fn go(&mut self) {
133+
self.step();
134+
}
135+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
object ExtAgreement {}
2+
3+
trait ExtAgreement {
4+
def extId: String = "x"
5+
}
6+
7+
trait OtherAgreement
8+
9+
class MAgreement(agreement: String)(implicit queryService: Int)

0 commit comments

Comments
 (0)