The Racket repository
Go to file
Matthew Flatt daa7ddeef8 workarounds for Windows filesystem behavior
* When you delete a file in Windows, then the name doesn't go away
  until the file is closed in all processes (and background tasks like
  search indexing may open files behind your back). Worse, attempting
  to create a new file with the same name reports a permission error,
  not a file-exists error; there's seems to be no way to tell whether
  a permission error was really a file-exists error.

  This creates trouble for `make-temporary-file` when files are
  created, deleted, and created again quickly enough and when
  something like a search indexer runs in the background (which is the
  usual Windows configuration). In practice, that kind of collision
  happens often for `raco setup` on my machine.

  To compensate, make `make-temporary-file` try up to 32 times on a
  permission error. A collision that many times seems extremely
  unlikely, and it seems ok to delay an actual permission error.

  Windows provides a GetTempFileName function from "kernel.dll" that
  must be able to deal with this somehow --- perhaps because it's in
  the kernel --- but it doesn't solve the problem for making temporary
  directories, hence the 32-tries approach for now.

* When a deleted file's name persists because the file is open in some
  process, then a directory containing the file cannot be deleted.

  This creates trouble for `delete-directory/files`, since
  `delete-file` on a directory's content doesn't necessarily make the
  directory empty. In practice, this happens often for package
  upgrades on my machine, where the package system wants to delete a
  short-lived working space that the indexer is trying to scan.

  To compenstate, change `delete-directory/files` to delete a file by
  first moving it to the temporary directory with a fresh name, and
  then delete the file there. It may take a while for a file to
  disappear from the temporary directory, but meanwhile it's not in
  the way of the original enclosing directory.

* When a file is open by any process, it prevents renaming any
  ancestor directory of the file.

  This creates trouble for the package system, which installs a
  package by unpacking it in a temporary place and then moving it by
  renaming. The package system also removes a package by renaming it
  to a subdirectory of a ".trash" directory. If a background indexer
  has a package file open, the move fails. In practice, a move fails
  often on my machine when I'm attempting to upgrade many packages.

  To compensate, make the package system fall back to copy + delete
  if moving fails with a permission error.
2018-06-13 18:57:07 -06:00
pkgs workarounds for Windows filesystem behavior 2018-06-13 18:57:07 -06:00
racket workarounds for Windows filesystem behavior 2018-06-13 18:57:07 -06:00
.gitattributes Don't include git files in archives. 2010-05-12 01:46:05 -04:00
.gitignore gitignore: vim swapfiles 2017-07-29 11:53:06 -04:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Disable pkg tests on Travis. 2017-06-22 13:33:03 -04:00
appveyor.yml use VS 2013 on AppVeyor 2018-05-15 11:07:06 -06:00
INSTALL.txt io: repairs for Windows path maniplation 2018-03-23 10:37:59 -06:00
Makefile io: repairs for Windows path maniplation 2018-03-23 10:37:59 -06:00
README.md switch to a new, Racket-implemented expander & module system 2018-02-26 13:19:53 -07:00

This is the source code for the core of Racket. See "INSTALL.txt" for full information on building Racket.

To build the full Racket distribution from this repository, run make in the top-level directory. To build minimal Racket, run make base.

The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.

Contribute to Racket by submitting a pull request, joining the development mailing list, or visiting the IRC channel.

License

Racket Copyright (c) 2010-2018 PLT Design Inc.

Racket is distributed under the GNU Lesser General Public License (LGPL). This implies that you may link Racket into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify Racket; if you distribute a modified version, you must distribute it under the terms of the LGPL, which in particular states that you must release the source code for the modified software.

See racket/src/COPYING_LESSER.txt for more information.