Commit Graph

27 Commits

Author SHA1 Message Date
ManuW
19c292f9a2 Improve let-expression examples (#680)
Because I did not understand what a `Let Expression` should be and the example code was more confusing as explanatory, I changed the format of the examples a little bit and changed the result.

- It should be clear that the example is just one code-line
- I tried out the example (`pkl eval...`) and get a little bit different result
2024-10-14 12:21:08 +01:00
Josh B
d720f21149 [docs] Add documentation for new keyword (#624) 2024-08-29 21:32:12 -07:00
Josh B
b28cdcd631 [docs] Improve searchability of "Methods" section (#625) 2024-08-29 21:32:12 -07:00
Josh B
63b92ec72b [docs] Document the class-as-a-function pattern (#614) 2024-08-29 21:32:12 -07:00
Josh B
3125fc4678 [docs] Document hidden equality/hashing behavior (#618)
* [docs] Document `hidden` equality/hashing behavior

* Update docs/modules/language-reference/pages/index.adoc

---------

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
2024-08-29 21:32:12 -07:00
Josh B
4bb6890621 [docs] Add mention of "optional" to nullably types section (#613) 2024-08-29 21:32:12 -07:00
Alan Scherger
4a7f90157a Documentation fix: const cannot be assigned/amended (#485) 2024-06-14 10:10:41 -07:00
Daniel Chao
a4c0a271b4 Require references from typealiases to be const (#516)
This adds a language change that requires references from typealiases
to the enclosing module to be `const`.

This is required because typealiases are not late-bound.

Rationale is laid out in SPICE-0007.

Also:
* Update documentation to reflect new rules.
* Fix `Project.pkl`; mark method `const` to not break said rule.
2024-06-10 09:01:05 -07:00
Daniel Chao
8ec06e631f Add support for Windows (#492)
This adds support for Windows.
The in-language path separator is still `/`, to ensure Pkl programs are cross-platform.

Log lines are written using CRLF endings on Windows.
Modules that are combined with `--module-output-separator` uses LF endings to ensure
consistent rendering across platforms.

`jpkl` does not work on Windows as a direct executable.
However, it can work with `java -jar jpkl`.

Additional details:

* Adjust git settings for Windows
* Add native executable for pkl cli
* Add jdk17 windows Gradle check in CI
* Adjust CI test reports to be staged within Gradle rather than by shell script.
* Fix: encode more characters that are not safe Windows paths
* Skip running tests involving symbolic links on Windows (these require administrator privileges to run).
* Introduce custom implementation of `IoUtils.relativize`
* Allow Gradle to initialize ExecutableJar `Property` values
* Add Gradle flag to enable remote JVM debugging

Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
2024-05-28 15:56:20 -07:00
translatenix
5de90d5868 Improve method.isConst() checks in InvokeMethodVirtualNode
- Check `method.isConst()` every time a method is resolved
  instead of once per node instance (`isConstChecked`).
  Given that `needsConst` only happens in very specific circumstances,
  I'm not entirely sure if every resolved method needs to be checked.
  However, it's a cleaner solution in any case, and `method.isConst()`
  is a fast check that also never happens on the `evalCached` fast path.
- Do not check for const-ness of `FunctionN.apply` methods.
  This check seems unnecessary and would always fail if triggered.
  (According to `base.pkl`, none of the `FunctionN.apply` methods is const.)
- Remove unnecessary Truffle boundaries for modifier checks,
  which are just bitwise operations.
- Improve const/import docs.
2024-04-19 15:35:57 -07:00
Phillip
ccf95d2af1 Correct spelling and grammar issues in Language Reference (#435)
Changes include:
1. Spelling correction addressing #401
2. Grammer and punctuation corrections.
3. Rephrasing of some harder-to-read sentences. Most are simple one or two-word additions to make reading less jarring.
4. Changed hyphenation occurrences that included &ndash; rather than a regular hyphen-dash.
2024-04-17 16:44:19 -07:00
Lily Ballard
889e64586a Fix member links custom link text examples in language reference (#427) 2024-04-12 13:35:08 -07:00
translatenix
3bd91b92ee Fix "amends declaration vs. expression" mistakes in language reference 2024-04-03 19:06:54 +01:00
d4wae89d498
3fb1f03780 Fix missing closing quotes in Local dependencies #298 (#299)
Fix missing closing quotes in 'Local Dependencies' section of index.adoc to ensure syntax correctness.
2024-03-07 10:42:10 -08:00
Daniel Chao
4f3858aaaf Docs fix: Container is not a type, add more types (#282)
Adjusts documentation to remove legacy `Container` type,
and add the rest of the generic types in the stdlib.
2024-03-04 07:49:44 -08:00
Daniel Chao
b0161a4777 Add specification for language binding API (#257)
This adds documentation for how the language bindings works, for those that wish to create their own bindings.
2024-02-28 08:10:16 -08:00
Zack McCauley
8f130d8d49 Fix multiple output example code (#205) 2024-02-22 10:28:23 +01:00
Islon Scherer
c652bbe5cd fix typo in doc for Listing default (#224) 2024-02-21 18:56:11 +01:00
Lily Ballard
bbb4d828a0 Update Reserved keywords list in the Language Reference (#171)
`const` is not reserved, it has a meaning already. And `match` is not a keyword at all.
2024-02-19 13:37:47 +01:00
Philip K.F. Hölzenspies
b3fb5dced6 Apply suggestions from code review 2024-02-13 16:57:12 +00:00
Hoxell
99717c61af Pigeon -> dodo 2024-02-13 16:57:12 +00:00
Daniel Chao
97f4193c15 Fix more links (#104)
This fixes more documentation links that are producing 404's.
2024-02-08 15:20:02 -08:00
Ricardo Pinheiro
20adac9919 Update Hidden Properties documentation (#91) 2024-02-07 21:15:53 -08:00
kelvine
9bc7ada4ae fixed typo on transiti[ti]on 2024-02-07 20:09:57 +00:00
Lily Ballard
bb3e3929ac Fix missing pkl eval subcommand in documentation examples 2024-02-07 20:04:41 +00:00
Dimitris Apostolou
80aff3afad Fix typos 2024-02-04 18:55:08 +02:00
Peter Niederwieser
ecad035dca Initial commit 2024-02-01 14:00:22 -08:00