Skip to content

Commit b61664e

Browse files
authored
Rollup misc doc and infrastructure tweaks (#58573)
This rolls up a couple of bug fixes with some tweaks to documentation and AGENTS.md that came in useful getting the AI to do #58572.
1 parent 75946ce commit b61664e

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/source-dist.tmp1
1414
/test/results_*.json
1515
/test/results_*.dat
16+
/test/deps
1617

1718
*.expmap
1819
*.exe

AGENTS.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ will not be reflected, unless you use `Revise`.
1919

2020
## For all changes
2121

22-
1. Run `make test-whitespace` before creating the PR to make sure you're not committing any whitespace errors.
22+
1. Run `make check-whitespace` before creating the PR to make sure you're not committing any whitespace errors.
2323

2424
## Building Julia
2525

@@ -47,8 +47,18 @@ Do not terminate the doctests before completion. If you are ChatGPT, you may hav
4747

4848
If you have changed a test (e.g. `foo`), you should run `make test-revise-foo` for the
4949
corresponding test to ensure that the test is still passing with your changes.
50-
If you are adding a new test, add it to an existing test file. Do not
51-
create a new test file unless explicitly instructed.
50+
- If you are adding a new test, add it to an existing test file. Do not create a new test file unless explicitly instructed.
51+
- Write one comment at the top of the test to explain what is being tested.
52+
Otherwise keep comments minimal.
53+
54+
### Writing code
55+
After writing code, look up the docstring for each function you used. If there
56+
are recommendations or additional considerations that apply to these functions,
57+
make sure to take them into account.
58+
59+
#### Specific instructions
60+
- Do not `ccall` runtime C functions directly if there are existing wrappers for the function.
61+
- Do not explicitly add a module prefix if the code you're adding is in the same module. E.g. do not use `Base.` for code in Base unless required.
5262

5363
## Commit message formatting
5464

@@ -58,3 +68,8 @@ of the purpose of the changes made. Do not specifically mention added tests, com
5868
documentation, etc., unless this is the main purpose of the change. Do not mention
5969
the test plan, unless it differs from what you were instructed to do in AGENTS.md.
6070
If your change fixes one or more issues, use the syntax "Fixes #" at the end of the commit message, but do not include it in the title.
71+
72+
When creating pull requests, if the pull request consists of one commit only,
73+
use the body of the commit for the body of the pull request. If there are multiple
74+
commits in the pull request, follow the same guidelines for the pull request
75+
as for the commit body.

base/runtime_internals.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,8 +1306,14 @@ max_world(m::Core.CodeInfo) = m.max_world
13061306
"""
13071307
get_world_counter()
13081308
1309-
Returns the current maximum world-age counter. This counter is global and monotonically
1309+
Returns the current maximum world-age counter. This counter is monotonically
13101310
increasing.
1311+
1312+
!!! warning
1313+
This counter is global and may change at any time between invocations.
1314+
In general, most reflection functions operate on the current task's world
1315+
age, rather than the global maximum world age. See [`tls_world_age`](@ref)
1316+
as well as the [manual chapter of world age](@ref man-world-age).
13111317
"""
13121318
get_world_counter() = ccall(:jl_get_world_counter, UInt, ())
13131319

doc/src/manual/worldage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The World Age mechanism
1+
# [The World Age mechanism](@id man-world-age)
22

33
!!! note
44
World age is an advanced concept. For the vast majority of Julia users, the world age

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $(TESTS):
3535
$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) $(TEST_JULIA_OPTIONS) ./runtests.jl $(TEST_SCRIPT_OPTIONS) $@)
3636

3737
install-revise-deps:
38-
$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) $(TEST_JULIA_OPTIONS) ./runtests.jl $(TEST_SCRIPT_OPTIONS) --revise)
38+
$(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) $(TEST_JULIA_OPTIONS) ./runtests.jl $(TEST_SCRIPT_OPTIONS) --revise --help-list install_revise_deps)
3939

4040
$(addprefix revise-, $(TESTS)): revise-% :
4141
@cd $(SRCDIR) && \

0 commit comments

Comments
 (0)