Skip to content

Commit 57cd095

Browse files
committed
fix punctuations and update plan in issue JuliaLang#12010 with pr JuliaLang#25586.
1 parent 1ddbc2d commit 57cd095

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/src/manual/modules.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ that also generates compiled code.
313313

314314
Other known potential failure scenarios include:
315315

316-
1. Global counters (for example, for attempting to uniquely identify objects) Consider the following
316+
1. Global counters (for example, for attempting to uniquely identify objects), consider the following
317317
code snippet:
318318

319319
```julia
@@ -338,12 +338,12 @@ Other known potential failure scenarios include:
338338
future, a mechanism may be provided to register an initializer function.)
339339
3. Depending on compile-time side-effects persisting through load-time. Example include: modifying
340340
arrays or other variables in other Julia modules; maintaining handles to open files or devices;
341-
storing pointers to other system resources (including memory);
341+
storing pointers to other system resources (including memory).
342342
4. Creating accidental "copies" of global state from another module, by referencing it directly instead
343343
of via its lookup path. For example, (in global scope):
344344

345345
```julia
346-
#mystdout = Base.stdout #= will not work correctly, since this will copy Base.stdout into this module =#
346+
# mystdout = Base.stdout #= will not work correctly, since this will copy Base.stdout into this module. =#
347347
# instead use accessor functions:
348348
getstdout() = Base.stdout #= best option =#
349349
# or move the assignment into the runtime:
@@ -356,15 +356,15 @@ code to help the user avoid other wrong-behavior situations:
356356
1. Calling [`eval`](@ref) to cause a side-effect in another module. This will also cause a warning to be
357357
emitted when the incremental precompile flag is set.
358358
2. `global const` statements from local scope after `__init__()` has been started (see issue #12010
359-
for plans to add an error for this)
359+
for plans to add an error for this and had been resolved by PR #25586).
360360
3. Replacing a module is a runtime error while doing an incremental precompile.
361361

362362
A few other points to be aware of:
363363

364364
1. No code reload / cache invalidation is performed after changes are made to the source files themselves,
365-
(including by [`Pkg.update`], and no cleanup is done after [`Pkg.rm`]
365+
(including by [`Pkg.update`], and no cleanup is done after [`Pkg.rm`].
366366
2. The memory sharing behavior of a reshaped array is disregarded by precompilation (each view gets
367-
its own copy)
367+
its own copy).
368368
3. Expecting the filesystem to be unchanged between compile-time and runtime e.g. [`@__FILE__`](@ref)/`source_path()`
369369
to find resources at runtime, or the BinDeps `@checked_lib` macro. Sometimes this is unavoidable.
370370
However, when possible, it can be good practice to copy resources into the module at compile-time

0 commit comments

Comments
 (0)