mirror of
https://github.com/apple/pkl.git
synced 2026-04-17 05:59:46 +02:00
Fix typos
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
package org.pkl.core;
|
||||
|
||||
/**
|
||||
* A SecurityManagerException declares that a violation occured during an external i/o operation.
|
||||
* A SecurityManagerException declares that a violation occurred during an external i/o operation.
|
||||
*
|
||||
* <p>{@link SecurityManagerException#getMessage()} is passed to users when errors arise.
|
||||
*/
|
||||
|
||||
@@ -60,7 +60,7 @@ public final class ValueRenderers {
|
||||
* Creates a renderer for {@link java.util.Properties} file format. If {@code omitNullProperties}
|
||||
* is {@code true}, object properties and map entries whose value is {@code null} will not be
|
||||
* rendered. If {@code restrictCharset} is {@code true} characters outside the printable US-ASCII
|
||||
* charset range will be rendererd as Unicode escapes (see
|
||||
* charset range will be rendered as Unicode escapes (see
|
||||
* https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3).
|
||||
*/
|
||||
public static ValueRenderer properties(
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class GeneratorPredicateMemberNode extends GeneratorMemberNode {
|
||||
var visitedKeys = EconomicSets.create();
|
||||
|
||||
// do our own traversal instead of relying on `VmAbstractObject.force/iterateMemberValues`
|
||||
// (more efficent and we don't want to execute `predicateNode` behind Truffle boundary)
|
||||
// (more efficient and we don't want to execute `predicateNode` behind Truffle boundary)
|
||||
for (var owner = parent; owner != null; owner = owner.getParent()) {
|
||||
var entries = EconomicMaps.getEntries(owner.getMembers());
|
||||
while (entries.advance()) {
|
||||
|
||||
@@ -516,7 +516,7 @@ public final class ModuleKeys {
|
||||
protected Pair<String, String> parseDependencyNotation(String importPath) {
|
||||
var idx = importPath.indexOf('/');
|
||||
if (idx == -1) {
|
||||
// treat named dependency wihout a subpath as the root path.
|
||||
// treat named dependency without a subpath as the root path.
|
||||
// i.e. resolve to `@foo` to `package://example.com/foo@1.0.0#/`
|
||||
return Pair.of(importPath.substring(1), "/");
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ class PackageResolvers {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves packages, cacheing them to disk.
|
||||
* Resolves packages, caching them to disk.
|
||||
*
|
||||
* <p>Uses the built-in zip file system in {@link jdk.nio.zipfs} for reading files from the zip
|
||||
* archive.
|
||||
@@ -480,12 +480,12 @@ class PackageResolvers {
|
||||
PackageUri packageUri, URI requestUri, @Nullable Checksums checksums)
|
||||
throws IOException, SecurityManagerException {
|
||||
var metadataFileName = getLastSegmentName(packageUri) + ".json";
|
||||
var metdataRelativePath = getRelativePath(packageUri).resolve(metadataFileName);
|
||||
var cachePath = cacheDir.resolve(metdataRelativePath);
|
||||
var metadataRelativePath = getRelativePath(packageUri).resolve(metadataFileName);
|
||||
var cachePath = cacheDir.resolve(metadataRelativePath);
|
||||
if (Files.exists(cachePath)) {
|
||||
return cachePath;
|
||||
}
|
||||
var tmpPath = tmpDir.resolve(metdataRelativePath);
|
||||
var tmpPath = tmpDir.resolve(metadataRelativePath);
|
||||
try {
|
||||
downloadMetadata(packageUri, requestUri, tmpPath, checksums);
|
||||
Files.createDirectories(cachePath.getParent());
|
||||
@@ -600,7 +600,7 @@ class PackageResolvers {
|
||||
var path = getZipFileSystem(uri, checksums).getPath(uri.getUri().getFragment());
|
||||
if (Files.isDirectory(path)) {
|
||||
if (allowDirectories) {
|
||||
// mimick the format that we get when reading a `file:` directory
|
||||
// mimic the format that we get when reading a `file:` directory
|
||||
try (var paths = Files.list(path)) {
|
||||
var text =
|
||||
paths
|
||||
|
||||
@@ -62,7 +62,7 @@ public final class Project {
|
||||
* <p>Evaluates a module's {@code output.value} to allow for embedding a project within a
|
||||
* template.
|
||||
*
|
||||
* @throws PklException if an error occured while evaluating the project file.
|
||||
* @throws PklException if an error occurred while evaluating the project file.
|
||||
*/
|
||||
public static Project loadFromPath(
|
||||
Path path,
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.pkl.core.util.json.JsonWriter;
|
||||
/**
|
||||
* The Java representation of a project's resolved dependency list. Resolved dependencies are stored
|
||||
* as JSON as a sibling file to PklProject. Each key in the JSON file records an entry for each
|
||||
* dependecy via its base URI, and the major version number.
|
||||
* dependency via its base URI, and the major version number.
|
||||
*
|
||||
* <p>A resolved dependency can either be local or remote. A remote dependency will have its
|
||||
* checksums recorded, while a local dependency will point to the relative path of the project
|
||||
@@ -100,7 +100,7 @@ public class ProjectDeps {
|
||||
private static EconomicMap<CanonicalPackageUri, Dependency> parseResolvedDependencies(
|
||||
Object object) throws JsonParseException, URISyntaxException {
|
||||
if (!(object instanceof JsObject)) {
|
||||
throw new FormatException("resolvedDendencies", "object", object.getClass());
|
||||
throw new FormatException("resolvedDependencies", "object", object.getClass());
|
||||
}
|
||||
var jsObj = (JsObject) object;
|
||||
var ret = EconomicMaps.<CanonicalPackageUri, Dependency>create(jsObj.size());
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FileSystemManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibily close this file system. Will not close if the file system was initialized externally
|
||||
* Possibly close this file system. Will not close if the file system was initialized externally
|
||||
* to Pkl.
|
||||
*/
|
||||
private static synchronized void close(Handle fs) throws IOException {
|
||||
|
||||
@@ -200,7 +200,7 @@ objectSpreadDuplicateEntry=\
|
||||
Cannot spread object because the enclosing object already has a declaration of entry key `{0}`.
|
||||
|
||||
objectSpreadDuplicateProperty=\
|
||||
Cannot spread object because the enclosing object already has a delcaration of property `{0}`.
|
||||
Cannot spread object because the enclosing object already has a declaration of property `{0}`.
|
||||
|
||||
cannotSpreadObject=\
|
||||
Cannot spread value of type `{0}` into object of type `{1}`.
|
||||
@@ -842,7 +842,7 @@ stackOverflow=\
|
||||
A stack overflow occurred.
|
||||
|
||||
multipleUnionDefaults=\
|
||||
A type union cannnot have more than one default type.
|
||||
A type union cannot have more than one default type.
|
||||
|
||||
notAUnion=\
|
||||
Only type unions can have a default marker (*).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
–– Pkl Error ––
|
||||
A type union cannnot have more than one default type.
|
||||
A type union cannot have more than one default type.
|
||||
|
||||
x | foo: *Int|*String|*"foo"
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
–– Pkl Error ––
|
||||
Cannot spread object because the enclosing object already has a delcaration of property `foo`.
|
||||
Cannot spread object because the enclosing object already has a declaration of property `foo`.
|
||||
|
||||
x | ...source
|
||||
^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user