Conversation
Collaborator
|
|
|
||
| nextIndex := 0 | ||
| seen := make(map[string]int) | ||
| s = repl.Old.ReplaceAllStringFunc(s, func(match string) string { |
Contributor
There was a problem hiding this comment.
These only apply in the context of a single file? Should we the index map global across all files in a test? Or is that not worth it?
Contributor
Author
There was a problem hiding this comment.
Good question, only going for single file there for simplicity.
| @@ -1,5 +1,7 @@ | |||
| cd this_dab | |||
|
|
|||
| touch ../other_dab/dist/lib/other_test_code-0.0.1-py3-none-any.whl # ensure timestamp is different | |||
Contributor
There was a problem hiding this comment.
Suggested change
| touch ../other_dab/dist/lib/other_test_code-0.0.1-py3-none-any.whl # ensure timestamp is different | |
| touch ../other_dab/dist/lib/other_test_code-0.0.1-py3-none-any.whl # create file at runtime to ensure that the mtime timestamp is different from the wheel in this_dab |
nit: clarifying the comment a bit helps here.
Contributor
Author
There was a problem hiding this comment.
The file already exists, I'm just updating mtime.
shreyas-goenka
approved these changes
Sep 29, 2025
andrewnester
approved these changes
Sep 29, 2025
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.
Changes
New Distinct option to [[Repls]]. Allows distinguishing different values of numeric ID instead of blending them all into single replacement.
https://chatgpt.com/s/cd_68da505c977c8191b80e26a298d3658e
Why
Replacements like NUMID and UNIX_TIME_NANOS lump different numbers and timestamps together but it's sometimes important to distinguish those (e.g. track id change or timestamp change).
For example, in this test https://github.com/databricks/cli/pull/3636/files#diff-d3f08b9d7e364b3acdac435ed772aaf58a092e853b671a8e6de1ef4790e0a4f4R81 it would be useful to see that only one library shows up in changes because the other one has the same timestamp.
Tests
New selftest.