Closed r0man closed 2 years ago
Hmm, for some reason the CICD is failing. It passes locally, though. Investigating ...
For some reason the rewritten Instaparse files are missing the ^{:mranderson/inlined true}
annotation on Circle CI while they are present locally 🤔
will have a proper look tomorrow
hi there, no objections to the PR. but the test failure seems to be genuine to me, fails locally the same way as on CI after make clean && make test
integration tests (make integration-test
) pass so that is a good sign. Let me know if you fix the test failure and I will be happy to merge this.
Hi @benedekfazekas , hmm, I still can't reproduce this. Let me take a closer look in the next days again.
thanks, will try to find time to do the same
was fixed along the lines you proposed @r0man with 718ef4a8591772fb12f665ea46b09b9689f6aac0, thanks for your contribution
Hello,
I would like to use Instaparse in Orchard and Cider as a dependency to parse stacktraces formatted by Aviso, Clojure and Java, and show them in the Cider stacktrace inspector.
In order to include Instaparse into the Cider middleware I think it must be shipped as a inlined dependency produced via mranderson.
Unfortunatly, mranderson wasn't able to inline Instaparse. It replaced namespace declarations in some of the files twice. The Instaparse JAR looks like this:
For some namepaces Instaparse has a CLJ and a CLJC file, the
instaparse/line-col
namespace for example.During the inlining done by mranderson, I observed the following behaviour:
Mr Anderson starts rewriting the instaparse dependency
It has a list of files to rewrite, one after the other
It starts rewriting
instaparse/line-col.clj
After rewriting
instaparse/line-col.clj
it rewrites all other files to refer to this new namespace, includinginstaparse/line-col.cljc
When
instaparse/line-col.cljc
is picked up for rewriting it's namepace was alreday replaced, but mranderson rewites it again.This PR avoids the double rewrite by checking if the file to be processed has already the new namespace. If it does it is just moved to the new location without rewriting it's content again.
What do you think of this fix?
[1] https://github.com/clojure-emacs/orchard/pull/164