gitgrip 0.10.0

Multi-repo workflow tool - manage multiple git repositories as one
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
//! Link command implementation
//!
//! Manages copyfile and linkfile entries.

use crate::cli::output::Output;
use crate::core::manifest::Manifest;
use crate::core::repo::RepoInfo;
use crate::git::path_exists;
use std::path::PathBuf;

/// Run the link command
pub fn run_link(
    workspace_root: &PathBuf,
    manifest: &Manifest,
    status: bool,
    apply: bool,
) -> anyhow::Result<()> {
    if status {
        show_link_status(workspace_root, manifest)?;
    } else if apply {
        apply_links(workspace_root, manifest)?;
    } else {
        // Default: show status
        show_link_status(workspace_root, manifest)?;
    }

    Ok(())
}

fn show_link_status(workspace_root: &PathBuf, manifest: &Manifest) -> anyhow::Result<()> {
    Output::header("File Link Status");
    println!();

    let repos: Vec<RepoInfo> = manifest
        .repos
        .iter()
        .filter_map(|(name, config)| RepoInfo::from_config(name, config, workspace_root))
        .collect();

    let mut total_links = 0;
    let mut valid_links = 0;
    let mut broken_links = 0;

    for (name, config) in &manifest.repos {
        let repo = repos.iter().find(|r| &r.name == name);

        // Check copyfiles
        if let Some(ref copyfiles) = config.copyfile {
            for copyfile in copyfiles {
                total_links += 1;
                let source = repo
                    .map(|r| r.absolute_path.join(&copyfile.src))
                    .unwrap_or_else(|| workspace_root.join(&config.path).join(&copyfile.src));
                let dest = workspace_root.join(&copyfile.dest);

                let status = if source.exists() && dest.exists() {
                    valid_links += 1;
                    "✓"
                } else if !source.exists() {
                    broken_links += 1;
                    "✗ (source missing)"
                } else {
                    broken_links += 1;
                    "✗ (dest missing)"
                };

                println!("  [copy] {} -> {} {}", copyfile.src, copyfile.dest, status);
            }
        }

        // Check linkfiles
        if let Some(ref linkfiles) = config.linkfile {
            for linkfile in linkfiles {
                total_links += 1;
                let source = repo
                    .map(|r| r.absolute_path.join(&linkfile.src))
                    .unwrap_or_else(|| workspace_root.join(&config.path).join(&linkfile.src));
                let dest = workspace_root.join(&linkfile.dest);

                let status = if source.exists() && dest.exists() && dest.is_symlink() {
                    valid_links += 1;
                    "✓"
                } else if !source.exists() {
                    broken_links += 1;
                    "✗ (source missing)"
                } else if !dest.exists() {
                    broken_links += 1;
                    "✗ (link missing)"
                } else {
                    broken_links += 1;
                    "✗ (not a symlink)"
                };

                println!("  [link] {} -> {} {}", linkfile.src, linkfile.dest, status);
            }
        }
    }

    // Process manifest repo links
    if let Some(ref manifest_config) = manifest.manifest {
        let manifests_dir = workspace_root.join(".gitgrip").join("manifests");

        // Check manifest copyfiles
        if let Some(ref copyfiles) = manifest_config.copyfile {
            for copyfile in copyfiles {
                total_links += 1;
                let source = manifests_dir.join(&copyfile.src);
                let dest = workspace_root.join(&copyfile.dest);

                let status = if source.exists() && dest.exists() {
                    valid_links += 1;
                    "✓"
                } else if !source.exists() {
                    broken_links += 1;
                    "✗ (source missing)"
                } else {
                    broken_links += 1;
                    "✗ (dest missing)"
                };

                println!(
                    "  [copy] manifest:{} -> {} {}",
                    copyfile.src, copyfile.dest, status
                );
            }
        }

        // Check manifest linkfiles
        if let Some(ref linkfiles) = manifest_config.linkfile {
            for linkfile in linkfiles {
                total_links += 1;
                let source = manifests_dir.join(&linkfile.src);
                let dest = workspace_root.join(&linkfile.dest);

                let status = if source.exists() && dest.exists() && dest.is_symlink() {
                    valid_links += 1;
                    "✓"
                } else if !source.exists() {
                    broken_links += 1;
                    "✗ (source missing)"
                } else if !dest.exists() {
                    broken_links += 1;
                    "✗ (link missing)"
                } else {
                    broken_links += 1;
                    "✗ (not a symlink)"
                };

                println!(
                    "  [link] manifest:{} -> {} {}",
                    linkfile.src, linkfile.dest, status
                );
            }
        }
    }

    println!();
    if total_links == 0 {
        println!("No file links defined in manifest.");
    } else if broken_links == 0 {
        Output::success(&format!("All {} link(s) valid", valid_links));
    } else {
        Output::warning(&format!(
            "{} valid, {} broken out of {} total",
            valid_links, broken_links, total_links
        ));
        println!();
        println!("Run 'gr link --apply' to fix broken links.");
    }

    Ok(())
}

fn apply_links(workspace_root: &PathBuf, manifest: &Manifest) -> anyhow::Result<()> {
    Output::header("Applying File Links");
    println!();

    let repos: Vec<RepoInfo> = manifest
        .repos
        .iter()
        .filter_map(|(name, config)| RepoInfo::from_config(name, config, workspace_root))
        .collect();

    let mut applied = 0;
    let mut errors = 0;

    for (name, config) in &manifest.repos {
        let repo = repos.iter().find(|r| &r.name == name);

        if !repo.map(|r| path_exists(&r.absolute_path)).unwrap_or(false) {
            continue;
        }

        // Apply copyfiles
        if let Some(ref copyfiles) = config.copyfile {
            for copyfile in copyfiles {
                let source = repo
                    .map(|r| r.absolute_path.join(&copyfile.src))
                    .unwrap_or_else(|| workspace_root.join(&config.path).join(&copyfile.src));
                let dest = workspace_root.join(&copyfile.dest);

                if !source.exists() {
                    Output::warning(&format!("Source not found: {:?}", source));
                    errors += 1;
                    continue;
                }

                // Create parent directory if needed
                if let Some(parent) = dest.parent() {
                    std::fs::create_dir_all(parent)?;
                }

                match std::fs::copy(&source, &dest) {
                    Ok(_) => {
                        Output::success(&format!("[copy] {} -> {}", copyfile.src, copyfile.dest));
                        applied += 1;
                    }
                    Err(e) => {
                        Output::error(&format!("Failed to copy: {}", e));
                        errors += 1;
                    }
                }
            }
        }

        // Apply linkfiles
        if let Some(ref linkfiles) = config.linkfile {
            for linkfile in linkfiles {
                let source = repo
                    .map(|r| r.absolute_path.join(&linkfile.src))
                    .unwrap_or_else(|| workspace_root.join(&config.path).join(&linkfile.src));
                let dest = workspace_root.join(&linkfile.dest);

                if !source.exists() {
                    Output::warning(&format!("Source not found: {:?}", source));
                    errors += 1;
                    continue;
                }

                // Create parent directory if needed
                if let Some(parent) = dest.parent() {
                    std::fs::create_dir_all(parent)?;
                }

                // Remove existing link/file if present
                if dest.exists() || dest.is_symlink() {
                    let _ = std::fs::remove_file(&dest);
                }

                #[cfg(unix)]
                {
                    match std::os::unix::fs::symlink(&source, &dest) {
                        Ok(_) => {
                            Output::success(&format!(
                                "[link] {} -> {}",
                                linkfile.src, linkfile.dest
                            ));
                            applied += 1;
                        }
                        Err(e) => {
                            Output::error(&format!("Failed to create symlink: {}", e));
                            errors += 1;
                        }
                    }
                }

                #[cfg(windows)]
                {
                    // On Windows, use junction for directories, symlink for files
                    if source.is_dir() {
                        match std::os::windows::fs::symlink_dir(&source, &dest) {
                            Ok(_) => {
                                Output::success(&format!(
                                    "[link] {} -> {}",
                                    linkfile.src, linkfile.dest
                                ));
                                applied += 1;
                            }
                            Err(e) => {
                                Output::error(&format!("Failed to create symlink: {}", e));
                                errors += 1;
                            }
                        }
                    } else {
                        match std::os::windows::fs::symlink_file(&source, &dest) {
                            Ok(_) => {
                                Output::success(&format!(
                                    "[link] {} -> {}",
                                    linkfile.src, linkfile.dest
                                ));
                                applied += 1;
                            }
                            Err(e) => {
                                Output::error(&format!("Failed to create symlink: {}", e));
                                errors += 1;
                            }
                        }
                    }
                }
            }
        }
    }

    // Apply manifest repo links
    if let Some(ref manifest_config) = manifest.manifest {
        let manifests_dir = workspace_root.join(".gitgrip").join("manifests");

        if manifests_dir.exists() {
            // Apply manifest copyfiles
            if let Some(ref copyfiles) = manifest_config.copyfile {
                for copyfile in copyfiles {
                    let source = manifests_dir.join(&copyfile.src);
                    let dest = workspace_root.join(&copyfile.dest);

                    if !source.exists() {
                        Output::warning(&format!("Source not found: {:?}", source));
                        errors += 1;
                        continue;
                    }

                    // Create parent directory if needed
                    if let Some(parent) = dest.parent() {
                        std::fs::create_dir_all(parent)?;
                    }

                    match std::fs::copy(&source, &dest) {
                        Ok(_) => {
                            Output::success(&format!(
                                "[copy] manifest:{} -> {}",
                                copyfile.src, copyfile.dest
                            ));
                            applied += 1;
                        }
                        Err(e) => {
                            Output::error(&format!("Failed to copy: {}", e));
                            errors += 1;
                        }
                    }
                }
            }

            // Apply manifest linkfiles
            if let Some(ref linkfiles) = manifest_config.linkfile {
                for linkfile in linkfiles {
                    let source = manifests_dir.join(&linkfile.src);
                    let dest = workspace_root.join(&linkfile.dest);

                    if !source.exists() {
                        Output::warning(&format!("Source not found: {:?}", source));
                        errors += 1;
                        continue;
                    }

                    // Create parent directory if needed
                    if let Some(parent) = dest.parent() {
                        std::fs::create_dir_all(parent)?;
                    }

                    // Remove existing link/file if present
                    if dest.exists() || dest.is_symlink() {
                        let _ = std::fs::remove_file(&dest);
                    }

                    #[cfg(unix)]
                    {
                        match std::os::unix::fs::symlink(&source, &dest) {
                            Ok(_) => {
                                Output::success(&format!(
                                    "[link] manifest:{} -> {}",
                                    linkfile.src, linkfile.dest
                                ));
                                applied += 1;
                            }
                            Err(e) => {
                                Output::error(&format!("Failed to create symlink: {}", e));
                                errors += 1;
                            }
                        }
                    }

                    #[cfg(windows)]
                    {
                        if source.is_dir() {
                            match std::os::windows::fs::symlink_dir(&source, &dest) {
                                Ok(_) => {
                                    Output::success(&format!(
                                        "[link] manifest:{} -> {}",
                                        linkfile.src, linkfile.dest
                                    ));
                                    applied += 1;
                                }
                                Err(e) => {
                                    Output::error(&format!("Failed to create symlink: {}", e));
                                    errors += 1;
                                }
                            }
                        } else {
                            match std::os::windows::fs::symlink_file(&source, &dest) {
                                Ok(_) => {
                                    Output::success(&format!(
                                        "[link] manifest:{} -> {}",
                                        linkfile.src, linkfile.dest
                                    ));
                                    applied += 1;
                                }
                                Err(e) => {
                                    Output::error(&format!("Failed to create symlink: {}", e));
                                    errors += 1;
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    println!();
    if errors == 0 {
        Output::success(&format!("Applied {} link(s)", applied));
    } else {
        Output::warning(&format!("{} applied, {} errors", applied, errors));
    }

    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::core::manifest::{
        CopyFileConfig, LinkFileConfig, ManifestRepoConfig, ManifestSettings, MergeStrategy,
        RepoConfig,
    };
    use std::collections::HashMap;
    use tempfile::TempDir;

    fn create_test_manifest(
        copyfiles: Option<Vec<CopyFileConfig>>,
        linkfiles: Option<Vec<LinkFileConfig>>,
    ) -> Manifest {
        let mut repos = HashMap::new();
        repos.insert(
            "test-repo".to_string(),
            RepoConfig {
                url: "git@github.com:user/test-repo.git".to_string(),
                path: "test-repo".to_string(),
                default_branch: "main".to_string(),
                copyfile: copyfiles,
                linkfile: linkfiles,
                platform: None,
                reference: false,
                groups: Vec::new(),
            },
        );

        Manifest {
            version: 1,
            manifest: None,
            repos,
            settings: ManifestSettings {
                pr_prefix: "[cross-repo]".to_string(),
                merge_strategy: MergeStrategy::default(),
            },
            workspace: None,
        }
    }

    #[test]
    fn test_show_link_status_no_links() {
        let temp = TempDir::new().unwrap();
        let manifest = create_test_manifest(None, None);

        // Should not error even with no links
        let result = show_link_status(&temp.path().to_path_buf(), &manifest);
        assert!(result.is_ok());
    }

    #[test]
    fn test_apply_copyfile() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("README.md"), "# Test").unwrap();

        let copyfiles = vec![CopyFileConfig {
            src: "README.md".to_string(),
            dest: "REPO_README.md".to_string(),
        }];

        let manifest = create_test_manifest(Some(copyfiles), None);

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify the file was copied
        let dest_path = workspace.join("REPO_README.md");
        assert!(dest_path.exists());
        let content = std::fs::read_to_string(&dest_path).unwrap();
        assert_eq!(content, "# Test");
    }

    #[test]
    #[cfg(unix)]
    fn test_apply_linkfile() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("config.yaml"), "key: value").unwrap();

        let linkfiles = vec![LinkFileConfig {
            src: "config.yaml".to_string(),
            dest: "linked-config.yaml".to_string(),
        }];

        let manifest = create_test_manifest(None, Some(linkfiles));

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify the symlink was created
        let dest_path = workspace.join("linked-config.yaml");
        assert!(dest_path.exists());
        assert!(dest_path.is_symlink());

        // Verify we can read through the symlink
        let content = std::fs::read_to_string(&dest_path).unwrap();
        assert_eq!(content, "key: value");
    }

    #[test]
    fn test_apply_links_missing_source() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory but NOT the source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();

        let copyfiles = vec![CopyFileConfig {
            src: "nonexistent.txt".to_string(),
            dest: "dest.txt".to_string(),
        }];

        let manifest = create_test_manifest(Some(copyfiles), None);

        // Should succeed but skip the missing file
        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Dest should not exist
        assert!(!workspace.join("dest.txt").exists());
    }

    #[test]
    fn test_apply_links_creates_parent_dirs() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("file.txt"), "content").unwrap();

        let copyfiles = vec![CopyFileConfig {
            src: "file.txt".to_string(),
            dest: "nested/dir/file.txt".to_string(),
        }];

        let manifest = create_test_manifest(Some(copyfiles), None);

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify nested directory was created
        let dest_path = workspace.join("nested/dir/file.txt");
        assert!(dest_path.exists());
    }

    #[test]
    fn test_copyfile_overwrites_existing() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("config.txt"), "new content").unwrap();

        // Create existing destination file
        std::fs::write(workspace.join("config.txt"), "old content").unwrap();

        let copyfiles = vec![CopyFileConfig {
            src: "config.txt".to_string(),
            dest: "config.txt".to_string(),
        }];

        let manifest = create_test_manifest(Some(copyfiles), None);

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify the file was overwritten
        let content = std::fs::read_to_string(workspace.join("config.txt")).unwrap();
        assert_eq!(content, "new content");
    }

    #[test]
    fn test_manifest_copyfile() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create manifest directory and source file
        let manifests_dir = workspace.join(".gitgrip").join("manifests");
        std::fs::create_dir_all(&manifests_dir).unwrap();
        std::fs::write(manifests_dir.join("CLAUDE.md"), "# Claude Guide").unwrap();

        // Create manifest with manifest-level copyfile
        let mut repos = std::collections::HashMap::new();
        repos.insert(
            "test-repo".to_string(),
            RepoConfig {
                url: "git@github.com:test/repo.git".to_string(),
                path: "test-repo".to_string(),
                default_branch: "main".to_string(),
                copyfile: None,
                linkfile: None,
                platform: None,
                reference: false,
                groups: Vec::new(),
            },
        );

        let manifest = Manifest {
            version: 1,
            manifest: Some(ManifestRepoConfig {
                url: "git@github.com:test/manifest.git".to_string(),
                default_branch: "main".to_string(),
                copyfile: Some(vec![CopyFileConfig {
                    src: "CLAUDE.md".to_string(),
                    dest: "CLAUDE.md".to_string(),
                }]),
                linkfile: None,
                platform: None,
            }),
            repos,
            settings: ManifestSettings {
                pr_prefix: "[cross-repo]".to_string(),
                merge_strategy: MergeStrategy::default(),
            },
            workspace: None,
        };

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify the manifest file was copied to workspace root
        let dest_path = workspace.join("CLAUDE.md");
        assert!(dest_path.exists());
        let content = std::fs::read_to_string(&dest_path).unwrap();
        assert_eq!(content, "# Claude Guide");
    }

    #[test]
    #[cfg(unix)]
    fn test_linkfile_points_to_source() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("shared.config"), "shared config").unwrap();

        let linkfiles = vec![LinkFileConfig {
            src: "shared.config".to_string(),
            dest: "linked.config".to_string(),
        }];

        let manifest = create_test_manifest(None, Some(linkfiles));

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify symlink points to the source file
        let dest_path = workspace.join("linked.config");
        let link_target = std::fs::read_link(&dest_path).unwrap();
        let expected_source = repo_dir.join("shared.config");

        // The target should resolve to the source file
        assert!(
            link_target.ends_with("test-repo/shared.config"),
            "Symlink should point to source, got: {:?}",
            link_target
        );
    }

    #[test]
    #[cfg(unix)]
    fn test_linkfile_replaces_existing_file() {
        let temp = TempDir::new().unwrap();
        let workspace = temp.path().to_path_buf();

        // Create repo directory and source file
        let repo_dir = workspace.join("test-repo");
        std::fs::create_dir_all(&repo_dir).unwrap();
        std::fs::write(repo_dir.join("config.yaml"), "new: value").unwrap();

        // Create existing regular file at destination
        std::fs::write(workspace.join("linked.yaml"), "old: value").unwrap();

        let linkfiles = vec![LinkFileConfig {
            src: "config.yaml".to_string(),
            dest: "linked.yaml".to_string(),
        }];

        let manifest = create_test_manifest(None, Some(linkfiles));

        let result = apply_links(&workspace, &manifest);
        assert!(result.is_ok());

        // Verify the destination is now a symlink
        let dest_path = workspace.join("linked.yaml");
        assert!(dest_path.is_symlink());

        // Verify content through symlink
        let content = std::fs::read_to_string(&dest_path).unwrap();
        assert_eq!(content, "new: value");
    }
}