Claude/port csharp dotnet10 qbkw5d#348
Closed
theolivenbaum wants to merge 15 commits into
Closed
Conversation
- Move original Java/Bazel implementation into java/ (reference only) - Add CLAUDE.md and TODO.md describing the port plan and work breakdown - Scaffold .NET 10 solution: Copybara.Common, Starlark, Copybara.Core, Copybara.Cli (packaged as 'copybara' .NET tool), Copybara.Tests - Add Preconditions and ImmutableListMultimap foundation helpers Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Defines [StarlarkBuiltin]/[StarlarkMethod]/[Param]/[ParamType] attributes, IStarlarkValue, NoneType, EvalException, and the Starlark helper class so domain types can be ported and compiled ahead of the full interpreter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…ecision - Original upstream README moved to java/README.md - New root README describes the C# / .NET 10 port and layout - Record decision to use native .NET regex engine (accepted deviation from re2j) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…thoring) Snapshot of in-progress .NET port. Not yet compiling end-to-end: the Starlark interpreter (syntax + eval) is still being ported, so Copybara.Core does not build yet. Consolidation/green-build pass to follow. Modules landed: Copybara.Exceptions, Copybara.Util.Console, Copybara.Revision, Copybara.Authoring, Copybara.TemplateToken. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Adds Copybara.Util: ExitCode, Glob subsystem, FileUtil, DirFactory, Identity, TablePrinter, and the process/command runner stack. Still WIP: Starlark interpreter (syntax + eval) in progress, so Copybara.Core does not build yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Adds Starlark.Eval value types (StarlarkInt/Float/List/Tuple/Dict/RangeList), Mutability, StarlarkSemantics, Printer, Module, StarlarkThread, EvalUtils, and Starlark helper extensions. Evaluator, reflection dispatch, string methods and sets deferred. Syntax package still in progress. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Consolidates the parallel port work into a compiling, tested state: - Starlark project (annot + syntax + eval + resolver/type-system + spelling) builds clean. Value types, lexer/parser/AST, resolver and type checker ported. Tree-walking evaluator and reflective [StarlarkMethod] dispatch are deferred (next milestone, needed for config loading). - Copybara.Core foundation: exceptions, util (Glob/FileUtil/CommandRunner), console, revision, authoring, templatetoken. - Fix CommandRunner to qualify System.Console (namespace collision with Copybara.Util.Console). - Add xUnit smoke tests (glob matching, author parse/equality, printf-style CheckCondition, multimap ordering); all 8 pass. - Update TODO.md to reflect landed vs deferred work. Whole solution: dotnet build = 0 warnings/0 errors; dotnet test = 8 passed; dotnet pack produces the 'copybara' .NET tool package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Starlark now parses, resolves, and EXECUTES real code end-to-end: - Eval tree-walker (assignments, control flow, comprehensions, closures/cells) - Reflective [StarlarkMethod]/[Param] dispatch: MethodDescriptor, ParamDescriptor, CallUtils, BuiltinFunction, StarlarkFunction, plus Starlark.Call/Fastcall/ ExecFile/Eval drivers - MethodLibrary universe builtins (len/str/type/list/dict/range/sorted/min/max/…) and StringModule (join/split/replace/format/strip/…), registered into UNIVERSE Deferred: StarlarkSet, float builtin, flag-guarded params, dynamic type checks. Whole solution builds 0/0; dotnet test = 15 passed (7 new StarlarkEvalTests executing functions, comprehensions, string methods, and a closure counter). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
Large milestone landing the core engine on top of the interpreter (10 agents + consolidation pass). Whole solution builds 0/0; 15 tests pass; tool packs. Engine spine (namespace Copybara): IOption/Options, GeneralOptions, WorkflowOptions/WorkflowMode, ModuleSet/ModuleSupplier, and the domain interfaces IOrigin/IDestination/ITransformation, TransformWork/TransformResult, CheckoutPath/CheckoutFileSystem, Metadata/Info/MigrationInfo, IEndpoint/ITrigger, ChangeMessage, LabelFinder, etc. Packages ported: - config/ (Config, ConfigFile, PathBasedConfigFile, SkylarkParser wired to the interpreter, ConfigLoader/IConfigLoaderProvider, ConfigValidator) - transform/ + transform/metadata/ + transform/debug/ (Replace, CopyOrMove, Sequence, ExplicitReversal, FilterReplace, VerifyMatch, TodoReplace, scrubbers) - Workflow<O,D> + Workflow.Create factory + WorkflowRunHelper + mode runners - CoreModule/CoreGlobal + struct/datetime/random Starlark modules - folder/ (FolderOrigin/FolderDestination/FolderModule) - action/, approval/, treestate/, version/, profiler/, effect/, monitor/ - util DiffUtil; CLI Main + ArgParser + migrate/info/validate commands Consolidation reconciled cross-module drift faithfully to the Java source: Workflow generic-arity via a reflective non-generic factory, EndpointProvider raw-type analogue (IEndpointProvider), Module.OfInnermostEnclosingStarlarkFunction added to the interpreter, Starlark-facing enums kept in SCREAMING_CASE for copy.bara.sky config compatibility, Preconditions value-type overloads. Also: capybara logo wired as NuGet PackageIcon + PackageReadmeFile (verified embedded in the .nupkg) and shown in README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…ldozer, toml/json/xml/html/re2, credentials Wave B (6 agents + consolidation). Whole solution builds 0/0; 15 tests pass. - git/ plumbing core: GitRepository (git-CLI-backed via CommandRunner, faithful to upstream), GitRevision, GitRepoType, GitEnvironment, GitCredential, Refspec, FetchResult, MergeResult, IntegrateLabel, SameGitTree, exceptions. - http/ (System.Net.Http.HttpClient) incl. auth/multipart/json/endpoint. - remotefile/ + archive/ (zip/tar/gzip; xz/bz2 TODO) + hashing/. - format/ (buildifier) + buildozer/ (shell out via CommandRunner). - toml/ (hand-rolled parser) + json/ (System.Text.Json) + xml/ (System.Xml) + html/ + re2/ (System.Text.RegularExpressions). - credentials/ (issuer/secret model) + minimal checks/ stub. Consolidation fixes: qualified Copybara.Util.Command vs Buildozer.Command, dropped meaningless CheckNotNull on a non-nullable struct in TtlSecret. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…l, language modules Wave C (5 agents + consolidation). Whole solution builds 0/0; 15 tests pass. - git/ origin/destination base: GitOrigin, GitDestination, GitDestinationReader, ChangeReader, GitVisitorUtil, Mirror, GitIntegrateChanges, options, write hooks. - git/github/api/ (~50 files): GitHubApi + transport (HttpClient) + entity DTOs with byte-identical JSON property names (gson @key -> [JsonPropertyName]). - git/gerritapi/ (30 files): GerritApi client, XSSI-prefix-aware parsing, nano timestamp handling. - git/gitlab/api/ (18 files): GitLabApi client + entities. - hg/ (Mercurial): HgRepository (shells to hg via CommandRunner), origin/dest/module. - go/, rust/, python/, tsjs/ (npm): version-resolution modules over HttpClient. Consolidation fixes: namespace/class name clash on GerritApi.NotifyType (global:: qualification), ambiguous record copy-ctor in ListProjectMergeRequestParams, Tuple alias in PythonModule. Provider classes (GitHubPrOrigin/GerritOrigin/GitLabMrOrigin etc.) and GitModule remain for the next wave. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…vaged) Wave D agents were interrupted by an account session limit; this commit lands the parts that compile and preserves the incomplete parts under wip/ (outside the build). Whole solution builds 0/0; 15 tests pass. Landed (compiling): - transform/patch/ (PatchModule, PatchTransformation, PatchingOptions, QuiltTransformation) - doc/ reference-generator core (reflection-based; partial) - git/github/util/ (GitHubHost, GitHubIdentifier, GitHubUtil) - GitHubDestinationOptions, GerritEventTrigger - Added ParamAttribute.Documented (faithful to Java @Param.documented) Preserved under wip/ (partial, interrupted; see wip/README.md): - Git/GitModule.cs (~2188/3677 lines), GitHubPrOriginOptions, GerritOptions, Onboard/ Remaining providers (GitHubPrOrigin/GerritOrigin/GitLabMrOrigin etc.), GitModule completion, feedback/regenerate/configgen, and rest of onboard/doc are pending (session limit resets 11:50am UTC). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…, regenerate, configgen Wave E (5 agents + consolidation). Whole solution builds 0/0; 15 tests pass. - Gerrit providers: GerritOrigin, GerritDestination, GerritEndpoint, GerritChange, GerritTrigger, GerritIntegrateLabel, GerritOptions. - GitLab providers: GitLabMrOrigin/Destination/Writer/WriteHook, GitLabOptions/Util. - GitHub providers: GitHubPrOrigin, GitHubPrDestination, GitHubEndPoint, GitHubOptions, write hooks, triggers, integrate label, repository hook, security/user approvals validators + pre/post-submit approvals providers, GitHubPrOriginOptions. - onboard/ (full input/generator framework), doc/ (reflection-based reference gen), feedback/, regenerate/, configgen/ (ConfigGenHeuristics), plus util RenameDetector/ AutoPatchUtil/ConsistencyFile. - Made select GitOrigin/GitDestination members virtual so providers subclass cleanly. - CLI-command classes kept as Core engine entry points (Run(...)) with TODO to wire into Copybara.Cli (Core must not depend on Cli). Consolidation fixes: nested-member accessibility (C# outer class can't see protected nested members), DiffFile.Operation.MODIFIED casing, delegate invocation. Only GitModule (the git Starlark module, ~2188/3677 lines) remains, preserved in wip/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
…t complete Final wave. Whole solution builds 0 warnings/0 errors; 15 tests pass. ~666 C# files / ~98.5k LOC. - GitModule: all 19 git.* Starlark factories wired (origin/destination/mirror/ integrate + github/gerrit/gitlab origins, destinations, apis, triggers + latest_version). - git/version: RefspecVersionList (+Tag/BranchVersionList), RequestedShaVersionSelector; wired FuzzyClosestVersionSelector and GitOrigin.Resolve version-selection paths. - starlark/StarlarkUtil, archive/util ArchiveUtil. Every package under java/com/google/copybara/** and the vendored net.starlark.java interpreter now has a C# counterpart. jcommander/* is intentionally superseded by the custom Copybara.Cli.ArgParser. Remaining work is integration (documented in TODO.md): wire ModuleSupplier module/ option registration, add thin Cli adapters for the regenerate/onboard command engines, archive xz/bz2 codecs, and expanded tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JKh2mEFxE6wgBgzDjpQV6f
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.