Newer
Older
dub_jkp / changelog / toolchain_requirements.dd
  1. `toolchainRequirements` recipe entry
  2.  
  3. DUB now supports a new entry in `dub.json` or `dub.sdl` to restrict the versions of
  4. DUB and of compilers supported by a package.
  5.  
  6. dub.json:
  7. ---
  8. {
  9. "toolchainRequirements": {
  10. "dub": "~>1.10",
  11. "frontend": ">=2.068 <2.083"
  12. }
  13. }
  14. ---
  15.  
  16. dub.sdl:
  17. ---
  18. toolchainRequirements dub="~>1.10" frontend=">=2.068|<2.083"
  19. ---
  20.  
  21. Supported entries in `toolchainRequirements` are:
  22. $(UL
  23. $(LI dub)
  24. $(LI frontend)
  25. $(LI dmd)
  26. $(LI ldc)
  27. $(LI gdc)
  28. )
  29.  
  30. Each can contain a
  31. $(LINK2 https://dub.pm/package-format-sdl.html#version-specs, version specification),
  32. where DMD-like versions are supported in addition to SemVer versions. For
  33. compilers, instead of a version specification, the keyword `no` can also be used
  34. to indicate that the compiler should not be used for this package.
  35.  
  36. Example scenario:$(BR)
  37. Package that needs DUB>=1.12, and that will only build with LDC>=1.10:
  38.  
  39. dub.json:
  40. ---
  41. {
  42. "toolchainRequirements": {
  43. "dub": ">=1.12",
  44. "dmd": "no",
  45. "gdc": "no",
  46. "ldc": ">=1.10"
  47. }
  48. }
  49. ---
  50.  
  51. dub.sdl:
  52. ---
  53. toolchainRequirements dub=">=1.12" dmd="no" gdc="no" ldc=">=1.10"
  54. ---