Framework validation issue #105

Closed
keith opened this Issue Apr 7, 2014 · 13 comments

Projects

None yet

3 participants

@keith
CocoaPods member

Frameworks should be allowed to have more than just letters and numbers. As it currently stands those are the only characters allowed although some frameworks have - in the name. This can be fixed by changing the regex to /[^a-zA-Z\-\d]/ and writing a test or two.

@keith keith added the d1:easy label Apr 7, 2014
@keith
CocoaPods member

This issue also exists for libraries from here libraries should also be able to have - and + (stdc++?)

@keith
CocoaPods member

These should both also allow underscores which could simplify the regex to /[^\w\-\+]/

@keith
CocoaPods member

There may be a larger issue with this. I've seen a few specs including specific versions I assume with something like z.1 or std++.6.0.9 which wouldn't work with this current plan.

@keith
CocoaPods member

curl.OSX although this example could probably switch to vendored_libraries

@keith
CocoaPods member

Another weird one: Geoloqi-$(CONFIGURATION)

@keith
CocoaPods member

At this point all the libraries that showed up because of this stricter check and were actually broken have been fixed. All the rest are currently correct with one of the above issues.

@keith keith added t2:defect and removed d1:easy labels Apr 7, 2014
@fabiopelosin
CocoaPods member

To recap tests should accept:

  • stdc++
  • curl.OSX
  • z.1
  • Geoloqi-$(CONFIGURATION)
@keith
CocoaPods member

👍 sorry kept running into new ones.

@keith
CocoaPods member

I think the best way to validate this would just be to check for lib in the beginning and the dylib at the end. I was hoping we could verify with dot's but that obviously wouldn't work either.

@Kapin
CocoaPods member

Just to summarize, frameworks just need the regex modified but libraries need to be reverted?

@keith
CocoaPods member

I believe so. Frameworks shouldn't be able to specify versions like that (I don't think). I didn't see any frameworks trying to do that in the list I was going over yesterday.

@fabiopelosin
CocoaPods member

The main purpose of the regex was to prevent the accidental specification of:

spec.frameworks = 'z, x'

So it shouldn't be completely reverted. I also think that we should add the examples above to the specs. Finally, I am of the opinion that we should not be over restrictive, and although not framework uses versions like that it is still a valid name and should be allowed.

@fabiopelosin
CocoaPods member
@Ashton-W Ashton-W pushed a commit to Ashton-W/Core that referenced this issue Nov 2, 2015
@fabiopelosin fabiopelosin [Spec::Linter] Improve frameworks validation logic 3236705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment