-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix typos #72314
Fix typos #72314
Conversation
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata Issue DetailsSecond commit cleans up trailing whitespaces in files from first commit.
|
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsSecond commit cleans up trailing whitespaces in files from first commit.
|
Test failure is #69125 |
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ReferenceSource/DescriptorMarker.cs
Outdated
Show resolved
Hide resolved
src/coreclr/vm/ClrEtwAll.man
Outdated
@@ -7483,7 +7483,7 @@ | |||
<opcode name="GCHeapDumpObjectReference" message="$(string.MonoProfilerPublisher.GCHeapDumpObjectReferenceOpcodeMessage)" symbol="CLR_MONO_PROFILER_GC_HEAP_DUMP_OBJECT_REFERENCE_OPCODE" value="70" /> | |||
<opcode name="MonitorContention" message="$(string.MonoProfilerPublisher.MonitorContentionOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_CONTENTION_OPCODE" value="71" /> | |||
<opcode name="MonitorFailed" message="$(string.MonoProfilerPublisher.MonitorFailedOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_FAILED_OPCODE" value="72" /> | |||
<opcode name="MonitorAquired" message="$(string.MonoProfilerPublisher.MonitorAquiredOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_AQUIRED_OPCODE" value="73" /> | |||
<opcode name="MonitorAcquired" message="$(string.MonoProfilerPublisher.MonitorAcquiredOpcodeMessage)" symbol="CLR_MONO_PROFILER_MONITOR_AQUIRED_OPCODE" value="73" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brianrob Is it ok to fix typos in opcode names here or would that be a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@am11 Could you please revert the change in the opcode names for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe open an issue on it so that it is not forgotten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted and opened #72324.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the opcode name could be considered a breaking change, depending upon how the events are consumed. I would not expect the string id to be a breaking change unless someone was looking for a specific string that they've hardcoded somewhere, but I wouldn't worry about that. For the most part, we have not fixed typos for opcodes, keywords, event names, and fields to avoid these types of breaks since there are lots of consumers out there that use string values instead of integer ids.
For reference, this time I used a tool called
#!/bin/sh
if [ "$1" = '-h' ] || [ "$1" = "--help" ] || [ "$1" = "-?" ]; then
echo "Usage: $0 or $0 <to> <from>\n\nExample - to get most recurring typos in a git repo in 20 to 50 window:\n $0 20 50\n\nDefaults are from: 0 to: 100"
exit 0
fi
if ! command -v rustc 2>/dev/null; then
echo "Installing rust .."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
if ! command -v cargo 2>/dev/null; then
echo "Setting up cargo environment .."
. "$HOME/.cargo/env"
fi
if ! command -v typos 2>/dev/null; then
echo "Installing 'typos' crate .."
cargo install typos-cli
fi
echo "Collecting typos data in list.json .."
# (assuming working directory is root of 'runtime' so it respects .gitignore rules)
typos --format=json > list.json
# we don't use other features of typos tool (such as "apply corrections") -- only collecting data.
echo "Analyzing data using jq .."
# group typos by name, sort by their frequency and display N items (default 0 to 100)
from="${1:-0}" to="${2:-100}"
jq --slurp --argjson from $from --argjson to $to --compact-output \
'[ group_by(.typo)[] | {word: .[0].typo, count: length, correction: (if .[0].corrections then .[0].corrections | join(", ") else "" end) } ] | sort_by(.count) | reverse | .[$from:$to]' list.json |\
jq -r '["Count","Word", "Available Corrections"], ["--","------","------"], (.[] | [.count,.word,.correction]) | @tsv' (I'm sure the last part can be improved and squashed into one jq command, still warming up to jq language syntax 😁) There were some false-positives so i created a quick (non-exhaustive) [default.extend-words]
ba = "ba"
fo = "fo"
nd = "nd"
ot = "ot"
ue = "ue"
ser = "ser"
BA = "BA"
Ba = "Ba"
inout = "inout"
SEH = "SEH" These two files are for "finding" typos and not checked in, as there is manual work involved for the next step; "fixing" typos. To fix the correction repo-wide, I used manual find & replace approach: |
@@ -373,7 +373,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
Prepare build for ReadyToRun compilations. Builds list of assemblies to compile, and computes paths to ReadyToRun compiler bits | |||
============================================================ | |||
--> | |||
<UsingTask Condition="'$(Crossgen2TasksOverriden)' != 'true'" TaskName="PrepareForReadyToRunCompilation" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crossgen2TasksOverriden is used in dotnet/sdk. Fixing this one would have to be coordinated between repos and runtime versions, probably not worth it. Could you please revert this one?
@@ -50,16 +50,16 @@ Tudo pronto? Então, vamos nessa!</String> | |||
<String Id="FailureRestartText">Você deve reiniciar seu computador para concluir a reversão do software.</String> | |||
<String Id="FailureRestartButton">&Reiniciar</String> | |||
<String Id="FailureCloseButton">&Fechar</String> | |||
<String Id="FailureNotSupportedCurrentOperatingSystem">Não há suporte para o [PRODUCT_NAME] neste sistema operacional. Para obter mais informações, confira [LINK_PREREQ_PAGE].</String> | |||
<String Id="FailureNotSupportedX86OperatingSystem">O [PRODUCT_NAME] não tem suporte em sistemas operacionais x86. Instale usando o instalador x86 correspondente.</String> | |||
<String Id="FailureNotSupportedCurrentOperatingSystem">Não há supporte para o [PRODUCT_NAME] neste sistema operacional. Para obter mais informações, confira [LINK_PREREQ_PAGE].</String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is Brazil Portuguese. Is supporte
correct? Bing translator shows it with single p
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't noticed it, thanks. It is reverted. I will treat wxl like xlf in the future. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Second commit cleans up trailing whitespaces in files from first commit.