Skip to content

Fix git information lookup folder, fixes incremental compilation. #756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

Mpdreamz
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings March 17, 2025 14:09
@Mpdreamz Mpdreamz requested a review from a team as a code owner March 17, 2025 14:09
@Mpdreamz Mpdreamz added the fix label Mar 17, 2025
@Mpdreamz Mpdreamz self-assigned this Mar 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts the git lookup folder for incremental compilation and updates the JSON mapping for the RepositoryName property in the git checkout information.

  • Replaces DocumentationSourceDirectory with rootFolder for determining the git source folder.
  • Removes lazy-loaded RepositoryName in favor of a direct JSON-mapped property.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Elastic.Markdown/BuildContext.cs Updates the source folder passed to git lookup to use rootFolder, supporting the incremental compilation fix.
src/Elastic.Markdown/IO/Discovery/GitCheckoutInformation.cs Replaces the lazy initialization for RepositoryName with a JSON property mapping ("name").
Comments suppressed due to low confidence (2)

src/Elastic.Markdown/BuildContext.cs:79

  • Verify that 'rootFolder' is correctly initialized and represents the intended directory for git lookup. If 'rootFolder' is not properly defined in this context it could lead to unexpected behavior.
Git = GitCheckoutInformation.Create(rootFolder, ReadFileSystem);

src/Elastic.Markdown/IO/Discovery/GitCheckoutInformation.cs:31

  • Ensure that changing the JSON property name for RepositoryName to 'name' is compatible with all consuming components, as this alters the serialized contract.
[JsonPropertyName("name")]
	public string? RepositoryName { get; init; }

@Mpdreamz Mpdreamz merged commit 3cb0b39 into main Mar 17, 2025
10 checks passed
@Mpdreamz Mpdreamz deleted the fix/incremental-compile branch March 17, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants