This is just a plain HTML with BulmaJS to create a responsive web.
serchinastico / kin Goto Github PK
View Code? Open in Web Editor NEWSane PBXProj files
License: Apache License 2.0
Sane PBXProj files
License: Apache License 2.0
Resource files can optionally contain a path
field
[u"line 10250:3 mismatched input 'path' expecting 'sourceTree'", u"line 10269:3 mismatched input 'path' expecting 'sourceTree'"]
/* Begin PBXVariantGroup section */
2E09599F1C58EDF700B6A007 /* Localizable.stringsdict */ = {
isa = PBXVariantGroup;
children = (
2E09599E1C58EDF700B6A007 /* es */,
2E0959A01C58EDFF00B6A007 /* en */,
);
name = Localizable.stringsdict;
path = Resources/Languages;
sourceTree = "<group>";
};
The following project file is not able to be parsed properly:
https://github.com/tuist/XcodeProj/blob/549d676/Fixtures/iOS/BuildSettings.xcodeproj/project.pbxproj
While having an option to specify a project.pbxproj file can be useful Kin should find that file in the current directory by default.
Just perform a search for something like *.xcodeproj/project.pbxproj
in the current directory if called with no parameters
Similar to #18
ERROR: line 391:4 mismatched input '"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DataModelBundle.bundle"' expecting {')', NON_QUOTED_STRING}
ERROR: line 428:4 mismatched input '"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DataModelBundle.bundle"' expecting {')', NON_QUOTED_STRING}
ERROR: line 463:4 mismatched input '"$(DERIVED_FILE_DIR)/Pods-ModelKit_Tests-checkManifestLockResult.txt"' expecting {')', NON_QUOTED_STRING}
ERROR: line 481:4 mismatched input '"$(DERIVED_FILE_DIR)/Pods-MigrationTests-checkManifestLockResult.txt"' expecting {')', NON_QUOTED_STRING}
Right now we are requiring antlr-runtime for python2, we can create another build for python 3 requiring the proper version of antlr.
There are a lot of problems in pbxproj
files and most of them are always the same!
We could handle the most common ones with Kin by using the parser ANTLR creates for us.
Some of the issues we could deal with are:
We can create separated issues in github when we start developing them.
When I try to run kin in my project directory it throws this error.
Traceback (most recent call last):
File "//anaconda/bin/kin", line 7, in <module>
from kin.kin import main
File "//anaconda/lib/python3.5/site-packages/kin/kin.py", line 5, in <module>
from verifier import Verifier
ImportError: No module named 'verifier'
I've tried to run pip install verifier
but there's no matching distribution found for verifier. Please let me know which dependencies I need to install to make this run. Thank you!
That 🔝
Encountered after adding a standard Carthage copy frameworks phase.
ERROR: line 294:3 mismatched input 'inputFileListPaths' expecting 'inputPaths'
ERROR: line 299:3 mismatched input 'outputFileListPaths' expecting 'outputPaths'
ERROR: line 312:3 mismatched input 'inputFileListPaths' expecting 'inputPaths'
ERROR: line 317:3 mismatched input 'outputFileListPaths' expecting 'outputPaths'
ERROR: line 330:3 mismatched input 'inputFileListPaths' expecting 'inputPaths'
ERROR: line 337:3 mismatched input 'outputFileListPaths' expecting 'outputPaths'
Lines: 325-346 of my .pbxproj
A7CD39BE222E3AF6003FA014 /* Run Copy Carthage Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Alamofire.framework",
"$(SRCROOT)/Carthage/Build/iOS/AlamofireImage.framework",
);
name = "Run Copy Carthage Frameworks";
outputFileListPaths = (
);
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Alamofire.framework",
"$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AlamofireImage.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
Traceback (most recent call last):
File "/Users/ghilston/.virtualenvs/kin/bin/kin", line 7, in <module>
from kin.kin import main
File "/Users/ghilston/.virtualenvs/kin/lib/python3.6/site-packages/kin/kin.py", line 5, in <module>
from verifier import Verifier
ModuleNotFoundError: No module named 'verifier'
Unable to get kin to run. I believe the upload to PyPi is botched?
Hi,
I noticed that the warning on the BuildIndependentTargetsInParallel field, located under Begin PBXProject section
/Project object
/attributes, is triggering falsely. Despite being set to 1, my project is working correctly and the error message is unnecessary. Please let me know if you require additional information regarding this issue.
Xcode 14.2 on Ventura 13.2.1
.pbxproj
file:/* Begin PBXProject section */
151C376429A313FA00528ECF /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
When using kin with no arguments we should make sure there is only one xcodeproj directory to look for the target file, if there is more than one then we should return an error.
In the future we might let the user choose which one he wants to use
376ECC3E19B8E11400C9745B = {
CreatedOnToolsVersion = 6.0;
DevelopmentTeam = AHSIDAPK23;
LastSwiftMigration = 0800;
ProvisioningStyle = Manual;
Handle the LastSwiftMigration
field
/* Begin PBXProject section */
49B2C5F91DCCF3EB00E33350 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0800;
TargetAttributes = {
49B2C6011DCCF3EB00E33350 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0800;
ProvisioningStyle = Manual;
};
Traceback (most recent call last): File "/usr/local/bin/kin", line 11, in <module> load_entry_point('kin==2.0.2', 'console_scripts', 'kin')() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2843, in load_entry_point return ep.load() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2434, in load return self.resolve() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2440, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Library/Python/2.7/site-packages/kin-2.0.2-py2.7.egg/kin/kin.py", line 5, in <module> from .verifier import Verifier File "/Library/Python/2.7/site-packages/kin-2.0.2-py2.7.egg/kin/verifier.py", line 1, in <module> from antlr4 import * File "build/bdist.macosx-11.5-x86_64/egg/antlr4/__init__.py", line 1, in <module> File "/Library/Python/2.7/site-packages/antlr4_python3_runtime-4.9.2-py2.7.egg/antlr4/Token.py", line 60 def text(self, text:str): ^ SyntaxError: invalid syntax
I downloaded kin but cannot run on project. I donot believe it just me couldn't follow the instructions.
In Usage section,
it mentions download with pip but pip is not available on new MacBooks. if Pip3 is the option then cool But the next step is less instructive than the download section.
After downloading, run kin it states however packages installed from pip can not be directly called from command line.
That's why, I started with python3 command to open an interpreter. It didn't work with directly calling kin or importing kin.
Couple re-try and re-start weren't helpful as well. Then, I searched for a better guide. Not a chance of course.
The only useful resource was this medium article. After that, I tried to kin to command line. I found this. Usage of pipx helped me to get there.
After following the instructions for pipx download. I finally was able to use kin in my computer.
This process shouldnot be this hard. This can be updated so quickly and the next person should not have spend as much time as I spent.
So, How is this usage instructions improved? and How can I help?
I tried running Kin on a project and got this error
Traceback (most recent call last):
File "/usr/local/bin/kin", line 5, in <module>
from kin.kin import main
File "/usr/local/lib/python3.7/site-packages/kin/kin.py", line 5, in <module>
from verifier import Verifier
ModuleNotFoundError: No module named 'verifier'
Got error note about this line:
527A67D41B8770CA00C4A690 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; lineEnding = 0; path = LICENSE; sourceTree = ""; xcLanguageSpecificationIdentifier = ""; };
We want to include LICENSE file into built application (for some reason I've forgotten) even if it is not a source code file. I believe this kin warning is not correct:
ERROR: line 2038:204 mismatched input '""' expecting NON_QUOTED_STRING
In addition to 24 character UUID objects, there can also be 32 character hex objects (they seem to be in Pods.xcodepro
files and xUnique can convert them), and also 14 character IDs.
Adding additional HEX
objects here and supporting 14-32 of them is a rudimentary workaround.
A newly discovered issue are objects with a purely numerical 24 character UUID. Support for this can be added with | NUMBER
but the solution becomes even less elegant.
Show a message telling the user that the project.pbxproj is OK
The following will produce the error:
path = 0840;
References that contain only numbers also have the same issue.
running kin produces this:
Traceback (most recent call last):
File "/usr/local/bin/kin", line 6, in
from kin.kin import main
File "/usr/local/lib/python3.6/site-packages/kin/kin.py", line 5, in
from verifier import Verifier
ModuleNotFoundError: No module named 'verifier'
Running Kin against this project causes the following errors:
ERROR: line 1868:4 extraneous input '6W8N7WB7Z36QWEFVAW5LHTNV' expecting {')', REFERENCE}
ERROR: line 1892:4 extraneous input '0CO5J70NW5JDTTZ5BCHAVYZE' expecting {';', ')', 'buildRules', 'rootObject', REFERENCE}
ERROR: line 1914:4 extraneous input '6OBYKZXD36MCSZYQLYVIY1AY' expecting {';', ')', 'buildRules', 'rootObject', REFERENCE}
ERROR: line 2125:2 extraneous input '0CO5J70NW5JDTTZ5BCHAVYZE' expecting REFERENCE
ERROR: line 2191:2 extraneous input '6OBYKZXD36MCSZYQLYVIY1AY' expecting REFERENCE
The project has been updated with Xcode 12.2 (12B45b) so it is expected to be valid.
I'm working on a project which project file has 38749
lines. I executed Kin when I messed up resolving a conflict on a project file and it saved my life again but for some time I couldn't see any feedback about what kin was doing and I thought something went wrong.
In order to improve the project usage, it could be great if we can add any visual feedback like a message or a progress bar shown to the user while kin is doing some magic.
I'd really like to collaborate with this project so if you tell me where to start looking at I can take a look and try to implement it by myself :)
Consider the following code excerpt:
49F4A5871C583A25007C84A1 /* files */ = {
isa = PBXGroup;
children = (
);
name = files;
sourceTree = "<group>";
};
Because files
is a token it will cause the following error:
mismatched input 'files' expecting {QUOTED_STRING, NON_QUOTED_STRING}
It appears as though using any tokens for these values causes the same error.
Hi,
I tried to run kin for the first time and I keep getting this error. I am not sure why.
Traceback (most recent call last):
File "/usr/local/bin/kin", line 5, in <module>
from kin.kin import main
File "/usr/local/lib/python2.7/site-packages/kin/kin.py", line 5, in <module>
from .verifier import Verifier
File "/usr/local/lib/python2.7/site-packages/kin/verifier.py", line 2, in <module>
from .grammar.PBXProjLexer import PBXProjLexer
File "/usr/local/lib/python2.7/site-packages/kin/grammar/PBXProjLexer.py", line 1165
def __init__(self, input=None, output:TextIO = sys.stdout):
^
SyntaxError: invalid syntax
We're using an Xcode Build Tool Plug-in in our project, and this seems to be causing problems.
Here's the error report:
ERROR: line 979:3 mismatched input 'productRef' expecting {'platformFilter', 'platformFilters', 'name', 'target', 'targetProxy'}
And here's what the .pbxproj
looks like:
F5F962002AD03AE000D334DA /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = F5F961FF2AD03AE000D334DA /* SwiftlintPlugin */;
};
Hello I have a problem,
I've installed Kin using the most recent Pip (python3) and when tried to use it I get an error:
Traceback (most recent call last): File "/usr/local/bin/kin", line 5, in <module> from kin.kin import main File "/usr/local/lib/python3.9/site-packages/kin/kin.py", line 5, in <module> from verifier import Verifier ModuleNotFoundError: No module named 'verifier'
I've read on the forum that Kin is made for python 2.7 only. Is it true? If so, is Kin unusable now since Pip supports only python 3 now?
I've just updated my kin
version from 1.6
to 1.7
and I got this error when running kin
on a regular project:
ANTLR runtime and generated code versions disagree: 4.6!=4.5.2
This could not be directly related to kin, if you need more information just let me know :)
Test files not following the syntax
Got this error note, not sure why. Looks ok to me, it also works during build:
ERROR: line 4512:4 mismatched input '"$(SRCROOT)/Carthage/Build/iOS/Mantle.framework"' expecting {')', NON_QUOTED_STRING}
for this script input paths in build phase script (screenshot included):
/* Begin PBXShellScriptBuildPhase section */
1A9BEBA51C7DD0C800FA3102 /* Carthage Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/Mantle.framework",
"$(SRCROOT)/Carthage/Build/iOS/PromiseKit.framework",
"$(SRCROOT)/Carthage/Build/iOS/OMGHTTPURLRQ.framework",
);
name = "Carthage Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks";
};
In order to make it interoperable with other tools, kin should return exit with an error code if it finds any error in the target file
It would be nice to install it with bundle install / bundle
Consider the following code excerpt:
/* Begin PBXShellScriptBuildPhase section */
B346FC962179468800C49108 /* Run gen68k */ = {
isa = PBXShellScriptBuildPhase;
inputPaths = (
$BUILD_DIR/$CONFIGURATION/gen68k,
);
};
Removing the dollar signs or the slash (/
) before the dollar sign ($
) resolves the issue.
Hello,
I tried to run kin after pip3 install but i always have the error : kin: command not found
As PR #29 shows, there's an opportunity for Kin to work not only in batch mode, but integrated with text editors and IDEs, doing checks in the background.
For a better experience, we should make the parser faster. Without leaving the convenience of using ANTLR, maybe we could massage the input grammar a little bit or memoize things so that the latency between checks is reduced and doesn't scale poorly as the Xcode project gets bigger.
Trying this out on our project, I'm getting what appear to be false positives.
$ kin
ERROR: line 9829:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
ERROR: line 9848:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
ERROR: line 9885:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
I suspect the issue is the same for all three, but including them for completeness.
298710CD23D9224C00289428 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 12;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = SwiftLint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n if which \"${SRCROOT}/scripts/swiftlint\" > /dev/null; then\n \"${SRCROOT}/scripts/swiftlint\" --fix --config \"$SRCROOT/.swiftlint.yml\" && \"${SRCROOT}/scripts/swiftlint\" lint --config \"$SRCROOT/.swiftlint.yml\"\n else\n echo \"warning: SwiftLint not installed, ask for help in #ask-ios as it should be present by default.\"\n fi\nfi\n";
};
4C6EA8941C1103AC00269803 /* Run Crashlytics */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
"$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF",
);
name = "Run Crashlytics";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\" -gsp \"${SRCROOT}/client/Analytics/GoogleService-Info.plist\"\n";
};
F805C45024623048005FDC33 /* Setup Firebase GoogleService-Info.plist */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Setup Firebase GoogleService-Info.plist";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp \"${SRCROOT}/client/Analytics/GoogleService-Info-$CONFIGURATION.plist\" \"${SRCROOT}/client/Analytics/GoogleService-Info.plist\"\n";
};
Thanks for building this tool!
The following error is now invalid as ProvisioningStyle = Automatic;
can be the last param.
ERROR: line 1320:6 mismatched input 'LastSwiftMigration' expecting '}'
A1F9D0091F5951EE0078CB66 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = CWB42KSFAW;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
Consider the following code excerpt:
B3AF46E021071CA6002211EE /* C */ = {
isa = PBXGroup;
children = (
);
name = C;
sourceTree = "<group>";
};
Because the path is only a single character it causes the following error:
mismatched input 'C' expecting {QUOTED_STRING, NON_QUOTED_STRING}
The problem does not occur if the string is quoted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.