Skip to content

Commit 6f4b2fa

Browse files
committed
Update for 1.8.4 release
1 parent 65a7980 commit 6f4b2fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9083
-22
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
## [1.8.4](https://github.com/nicklockwood/ShapeScript/releases/tag/1.8.4) (2024-02-18)
4+
5+
- Added `in` operator for testing if a value lies within a tuple or range
6+
- Negative subscript indices can now be used to access elements at the end of a list
7+
- Improved error messages for member access and subscripting
8+
- Fixed bug with subscripting parenthesized values
9+
- Fixed a bug with casting single-element tuples
10+
- Made SVGPath functions public
11+
- Bumped Euclid to version 0.7.7
12+
313
## [1.8.3](https://github.com/nicklockwood/ShapeScript/releases/tag/1.8.3) (2024-02-03)
414

515
- Fixed file access bug for iCloud hosted files

ShapeScript.podspec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ShapeScript",
3-
"version": "1.8.3",
3+
"version": "1.8.4",
44
"license": {
55
"type": "MIT",
66
"file": "LICENSE.md"
@@ -10,7 +10,7 @@
1010
"authors": "Nick Lockwood",
1111
"source": {
1212
"git": "https://github.com/nicklockwood/ShapeScript.git",
13-
"tag": "1.8.3"
13+
"tag": "1.8.4"
1414
},
1515
"source_files": ["ShapeScript", "LRUCache/Sources", "SVGPath/Sources"],
1616
"requires_arc": true,

ShapeScript.xcodeproj/project.pbxproj

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,12 @@
13461346
"$(inherited)",
13471347
"@executable_path/../Frameworks",
13481348
);
1349-
MARKETING_VERSION = 1.8.3;
1349+
MARKETING_VERSION = 1.8.4;
13501350
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptViewer;
13511351
PRODUCT_MODULE_NAME = Viewer;
13521352
PRODUCT_NAME = "ShapeScript Viewer";
13531353
PROVISIONING_PROFILE_SPECIFIER = "";
1354+
SUPPORTED_PLATFORMS = macosx;
13541355
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
13551356
SWIFT_VERSION = 5.0;
13561357
};
@@ -1374,18 +1375,20 @@
13741375
"$(inherited)",
13751376
"@executable_path/../Frameworks",
13761377
);
1377-
MARKETING_VERSION = 1.8.3;
1378+
MARKETING_VERSION = 1.8.4;
13781379
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptViewer;
13791380
PRODUCT_MODULE_NAME = Viewer;
13801381
PRODUCT_NAME = "ShapeScript Viewer";
13811382
PROVISIONING_PROFILE_SPECIFIER = "";
1383+
SUPPORTED_PLATFORMS = macosx;
13821384
SWIFT_VERSION = 5.0;
13831385
};
13841386
name = Release;
13851387
};
13861388
0183AA6B28EC0DE500AD1984 /* Debug */ = {
13871389
isa = XCBuildConfiguration;
13881390
buildSettings = {
1391+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
13891392
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
13901393
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
13911394
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -1404,23 +1407,23 @@
14041407
"$(inherited)",
14051408
"@executable_path/Frameworks",
14061409
);
1407-
MARKETING_VERSION = 1.8.3;
1410+
MARKETING_VERSION = 1.8.4;
14081411
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptViewer;
14091412
PRODUCT_MODULE_NAME = Viewer;
14101413
PRODUCT_NAME = ShapeScript;
1411-
SDKROOT = iphoneos;
14121414
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
1413-
SUPPORTS_MACCATALYST = NO;
1415+
SUPPORTS_MACCATALYST = YES;
14141416
SWIFT_EMIT_LOC_STRINGS = YES;
14151417
SWIFT_VERSION = 5.0;
14161418
TARGETED_DEVICE_FAMILY = "1,2,7";
1417-
TVOS_DEPLOYMENT_TARGET = 13.0;
1419+
TVOS_DEPLOYMENT_TARGET = 14.0;
14181420
};
14191421
name = Debug;
14201422
};
14211423
0183AA6C28EC0DE500AD1984 /* Release */ = {
14221424
isa = XCBuildConfiguration;
14231425
buildSettings = {
1426+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
14241427
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
14251428
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
14261429
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@@ -1439,25 +1442,25 @@
14391442
"$(inherited)",
14401443
"@executable_path/Frameworks",
14411444
);
1442-
MARKETING_VERSION = 1.8.3;
1445+
MARKETING_VERSION = 1.8.4;
14431446
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptViewer;
14441447
PRODUCT_MODULE_NAME = Viewer;
14451448
PRODUCT_NAME = ShapeScript;
1446-
SDKROOT = iphoneos;
14471449
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
1448-
SUPPORTS_MACCATALYST = NO;
1450+
SUPPORTS_MACCATALYST = YES;
14491451
SWIFT_EMIT_LOC_STRINGS = YES;
14501452
SWIFT_OPTIMIZATION_LEVEL = "-O";
14511453
SWIFT_VERSION = 5.0;
14521454
TARGETED_DEVICE_FAMILY = "1,2,7";
1453-
TVOS_DEPLOYMENT_TARGET = 13.0;
1455+
TVOS_DEPLOYMENT_TARGET = 14.0;
14541456
VALIDATE_PRODUCT = YES;
14551457
};
14561458
name = Release;
14571459
};
14581460
01BFB3A821425C8500E47A7C /* Debug */ = {
14591461
isa = XCBuildConfiguration;
14601462
buildSettings = {
1463+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
14611464
ALWAYS_SEARCH_USER_PATHS = NO;
14621465
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
14631466
CLANG_ANALYZER_NONNULL = YES;
@@ -1514,7 +1517,8 @@
15141517
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
15151518
MTL_FAST_MATH = YES;
15161519
ONLY_ACTIVE_ARCH = YES;
1517-
SDKROOT = macosx;
1520+
SUPPORTED_PLATFORMS = "xrsimulator xros watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
1521+
SUPPORTS_MACCATALYST = YES;
15181522
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
15191523
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
15201524
TVOS_DEPLOYMENT_TARGET = 11.0;
@@ -1526,6 +1530,7 @@
15261530
01BFB3A921425C8500E47A7C /* Release */ = {
15271531
isa = XCBuildConfiguration;
15281532
buildSettings = {
1533+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
15291534
ALWAYS_SEARCH_USER_PATHS = NO;
15301535
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
15311536
CLANG_ANALYZER_NONNULL = YES;
@@ -1576,7 +1581,8 @@
15761581
MACOSX_DEPLOYMENT_TARGET = 10.14;
15771582
MTL_ENABLE_DEBUG_INFO = NO;
15781583
MTL_FAST_MATH = YES;
1579-
SDKROOT = macosx;
1584+
SUPPORTED_PLATFORMS = "xrsimulator xros watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
1585+
SUPPORTS_MACCATALYST = YES;
15801586
SWIFT_COMPILATION_MODE = wholemodule;
15811587
TVOS_DEPLOYMENT_TARGET = 11.0;
15821588
VERSIONING_SYSTEM = "apple-generic";
@@ -1587,6 +1593,7 @@
15871593
01BFB3AB21425C8500E47A7C /* Debug */ = {
15881594
isa = XCBuildConfiguration;
15891595
buildSettings = {
1596+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
15901597
CLANG_ENABLE_MODULES = YES;
15911598
CODE_SIGN_IDENTITY = "";
15921599
CODE_SIGN_STYLE = Automatic;
@@ -1606,13 +1613,12 @@
16061613
"@executable_path/../Frameworks",
16071614
"@loader_path/Frameworks",
16081615
);
1609-
MARKETING_VERSION = 1.8.3;
1616+
MARKETING_VERSION = 1.8.4;
16101617
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
16111618
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
16121619
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptLib;
16131620
PRODUCT_NAME = ShapeScript;
16141621
SKIP_INSTALL = YES;
1615-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
16161622
SUPPORTS_MACCATALYST = YES;
16171623
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
16181624
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -1624,6 +1630,7 @@
16241630
01BFB3AC21425C8500E47A7C /* Release */ = {
16251631
isa = XCBuildConfiguration;
16261632
buildSettings = {
1633+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
16271634
CLANG_ENABLE_MODULES = YES;
16281635
CODE_SIGN_IDENTITY = "";
16291636
CODE_SIGN_STYLE = Automatic;
@@ -1643,13 +1650,12 @@
16431650
"@executable_path/../Frameworks",
16441651
"@loader_path/Frameworks",
16451652
);
1646-
MARKETING_VERSION = 1.8.3;
1653+
MARKETING_VERSION = 1.8.4;
16471654
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
16481655
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
16491656
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptLib;
16501657
PRODUCT_NAME = ShapeScript;
16511658
SKIP_INSTALL = YES;
1652-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
16531659
SUPPORTS_MACCATALYST = YES;
16541660
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
16551661
SWIFT_VERSION = 5.0;
@@ -1660,6 +1666,7 @@
16601666
01BFB3AE21425C8500E47A7C /* Debug */ = {
16611667
isa = XCBuildConfiguration;
16621668
buildSettings = {
1669+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
16631670
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
16641671
CODE_SIGN_IDENTITY = "-";
16651672
CODE_SIGN_STYLE = Automatic;
@@ -1675,14 +1682,15 @@
16751682
MACOSX_DEPLOYMENT_TARGET = 10.15;
16761683
PRODUCT_BUNDLE_IDENTIFIER = com.GeometryScriptTests;
16771684
PRODUCT_NAME = "$(TARGET_NAME)";
1678-
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
1685+
SUPPORTS_MACCATALYST = YES;
16791686
SWIFT_VERSION = 5.0;
16801687
};
16811688
name = Debug;
16821689
};
16831690
01BFB3AF21425C8500E47A7C /* Release */ = {
16841691
isa = XCBuildConfiguration;
16851692
buildSettings = {
1693+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
16861694
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
16871695
CODE_SIGN_IDENTITY = "-";
16881696
CODE_SIGN_STYLE = Automatic;
@@ -1698,7 +1706,7 @@
16981706
MACOSX_DEPLOYMENT_TARGET = 10.15;
16991707
PRODUCT_BUNDLE_IDENTIFIER = com.GeometryScriptTests;
17001708
PRODUCT_NAME = "$(TARGET_NAME)";
1701-
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator";
1709+
SUPPORTS_MACCATALYST = YES;
17021710
SWIFT_VERSION = 5.0;
17031711
};
17041712
name = Release;

ShapeScript/EvaluationContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ extension EvaluationContext {
265265
// TODO: move this logic out of EvaluationContext into delegate
266266
// so we can more easily mock the filesystem for testing purposes
267267
let isRemote = isUndownloadedUbiquitousFile(url)
268-
#if !os(iOS) && !os(visionOS)
268+
#if targetEnvironment(simulator) || !(os(iOS) || os(visionOS))
269269
// macOS/Linux/Windows can check for existence of files even without access permission
270270
guard isRemote || fileManager.fileExists(atPath: url.path) else {
271271
throw RuntimeErrorType.fileNotFound(for: path, at: url)

ShapeScript/Interpreter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111

1212
// MARK: Public interface
1313

14-
public let version = "1.8.3"
14+
public let version = "1.8.4"
1515

1616
public func evaluate(
1717
_ program: Program,

ShapeScriptTests/RegressionTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ private let testShapesURLs: [URL] = try! FileManager.default
2424
includingPropertiesForKeys: nil
2525
)
2626
.filter { $0.pathExtension == "shape" }
27+
.filter {
28+
#if os(iOS)
29+
return !$0.deletingPathExtension().lastPathComponent.hasSuffix("-mac")
30+
#else
31+
return !$0.deletingPathExtension().lastPathComponent.hasSuffix("-ios")
32+
#endif
33+
}
2734

2835
final class RegressionTests: XCTestCase {
2936
func testExamples() throws {

Viewer/Mac/WhatsNew.rtf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,31 @@ What's New in ShapeScript?\
1111
\
1212
\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0
1313

14+
\f1\b\fs28 \cf2 ShapeScript 1.8.4 \'97 2024-02-18\
15+
\
16+
\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0
17+
\cf2 \kerning1\expnd0\expndtw0 \'95
18+
\f0\b0 \expnd0\expndtw0\kerning0
19+
Added `in` operator for testing if a value lies within a tuple or range.\
20+
\ \'95
21+
\f0\b0 \expnd0\expndtw0\kerning0
22+
Negative subscript indices can now be used to access elements at the end of a list.\
23+
\ \'95
24+
\f0\b0 \expnd0\expndtw0\kerning0
25+
Improved error messages for member access and subscripting.\
26+
\ \'95
27+
\f0\b0 \expnd0\expndtw0\kerning0
28+
Fixed bug with subscripting parenthesized values.\
29+
\ \'95
30+
\f0\b0 \expnd0\expndtw0\kerning0
31+
Fixed a bug with casting single-element tuples.\
32+
\ \'95
33+
\f0\b0 \expnd0\expndtw0\kerning0
34+
Made SVGPath functions public.\
35+
\ \'95
36+
\f0\b0 \expnd0\expndtw0\kerning0
37+
Bumped Euclid to version 0.7.7.\
38+
\
1439
\f1\b\fs28 \cf2 ShapeScript 1.8.3 \'97 2024-02-03\
1540
\
1641
\pard\tx220\tx720\pardeftab720\li720\fi-720\partightenfactor0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Back.png",
5+
"idiom" : "vision",
6+
"scale" : "2x"
7+
}
8+
],
9+
"info" : {
10+
"author" : "xcode",
11+
"version" : 1
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
},
6+
"layers" : [
7+
{
8+
"filename" : "Front.solidimagestacklayer"
9+
},
10+
{
11+
"filename" : "Middle.solidimagestacklayer"
12+
},
13+
{
14+
"filename" : "Back.solidimagestacklayer"
15+
}
16+
]
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Front.png",
5+
"idiom" : "vision",
6+
"scale" : "2x"
7+
}
8+
],
9+
"info" : {
10+
"author" : "xcode",
11+
"version" : 1
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "vision",
5+
"scale" : "2x"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

0 commit comments

Comments
 (0)