Code Monkey home page Code Monkey logo

kin's Introduction

Personal website

This is just a plain HTML with BulmaJS to create a responsive web.

kin's People

Contributors

danielmartin avatar davideme avatar dnicolson avatar idiomaticrefactoring avatar newglad avatar pedrovgs avatar readmecritic avatar serchinastico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kin's Issues

Error with Xcode Build Tool Plug-in

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 */;
};

mismatched input 'inputFileListPaths' expecting 'inputPaths'

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";
		};

Getting SyntaxError: invalid syntax on Kin 2.0.2 with Python 2.7.18

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

mismatched input 'LastSwiftMigration' expecting '}'

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;
					};

Tokens used as values result in an error

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.

Explore possible parser performance improvements so that Kin can do better "on the fly" syntax checking

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.

LastSwift Migration Warning is not correct anymore

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;
					};

Kin not found in mac os

Hello,
I tried to run kin after pip3 install but i always have the error : kin: command not found

SyntaxError: invalid syntax

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

mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'

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.

ERROR: line 9829:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
		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";
		};
ERROR: line 9848:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
		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";
		};
ERROR: line 9885:3 mismatched input 'alwaysOutOfDate' expecting 'buildActionMask'
		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!

Single character unquoted strings cause mismatched input error

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.

Improve visual feedback

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 :)

Detect project.pbxproj automatically

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

Build phase script error with output paths

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}

ModuleNotFoundError: No module named 'verifier'

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?

Improve Usage Instructions

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?

Slashes between variables cause extraneous input error

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.

Support for multiple formats of ID references

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.

ANTLR warning running kin.

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 :)

Release 2.0.1 needs updated grammar

The grammar changes in #64 and #61 failed to commit because they were merged too quickly. The grammar compiled for the tests only and did not get committed.

Merging #66 should resolve the issue the grammar should be automatically updated.

Build phase triggers "extraneous input" error

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.

Pip does not support python 2 anymore

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?

Python 3 support

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'

xcLanguageSpecificationIdentifier can be quoted string

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

mismatched input '1' expecting NON_QUOTED_STRING

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.

Environment:

Xcode 14.2 on Ventura 13.2.1

Part of my .pbxproj file:

/* Begin PBXProject section */
		151C376429A313FA00528ECF /* Project object */ = {
			isa = PBXProject;
			attributes = {
				BuildIndependentTargetsInParallel = 1;

False error with some resource files

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>";
        };

Build phase script error about input paths

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";
        };

screen shot 2016-06-21 at 22 58 40

No module named 'verifier'

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!

No module name 'verifier'

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'

Add static analysis features to Kin

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:

  • NULL references [Remove them]
  • Unknown UUIDs referenced from groups [Remove them]
  • UUIDs of files that don't appear in any group [Remove them]
  • Duplicated UUIDs [Ask the user which one should we pick or try merging them]

We can create separated issues in github when we start developing them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.