equality of non-unique lvars broken for clojure 1.7

Description

clojure 1.7 changes the interning of strings when creating symbols, as is described here
https://github.com/clojure/clojure/blob/master/changes.md#23-keyword-and-symbol-construction

Therefore, two non-unique lvars with the same name don't have to be equal anymore with the current
Lvar equality method which checks (identical? name (:name o)).

This is causing expresso, which relies on non-unique lvars for the rule engine to fail with clojure 1.7

changing the identical? to a = fixes the issue.

Environment

None

Activity

Show:
David Nolen
July 3, 2015, 12:14 AM

When I apply this patch two tests fail. Can we fix these tests? Thanks!

import
July 26, 2015, 2:14 PM

Comment made by: mschuene

sorry for not responding quicker.
Which two tests are failing? It seems that they aren't always failing. I get zero failures with mvn test.
Also when I check out a fresh copy of core.logic master, apply the patch and run the tests all succeed.

~/programming $ git clone https://github.com/clojure/core.logic
Cloning into 'core.logic'...
remote: Counting objects: 14868, done.
remote: Total 14868 (delta 0), reused 0 (delta 0), pack-reused 14868
Receiving objects: 100% (14868/14868), 3.02 MiB | 1.86 MiB/s, done.
Resolving deltas: 100% (3955/3955), done.
Checking connectivity... done.
~/programming $ cd core.logic/
~/programming/core.logic $ git apply 0001-alter-equality-of-non-unique-lvars-for-clojure-1.7.patch
~/programming/core.logic $ mvn test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.clojure:core.logic:jar:0.8.11-SNAPSHOT
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building core.logic 0.8.11-SNAPSHOT
[INFO] ------------------------------------------------------------------------ [INFO]
[INFO] — maven-enforcer-plugin:1.0:enforce (enforce-maven) @ core.logic —
[INFO]
[INFO] — build-helper-maven-plugin:1.5:add-source (add-clojure-source-dirs) @ core.logic —
[INFO] Source directory: /home/kima/programming/core.logic/src/main/clojure added.
[INFO]
[INFO] — build-helper-maven-plugin:1.5:add-resource (add-clojure-source-dirs) @ core.logic —
[INFO]
[INFO] — build-helper-maven-plugin:1.5:add-test-source (add-clojure-test-source-dirs) @ core.logic —
[INFO] Test Source directory: /home/kima/programming/core.logic/src/test/clojure added.
[INFO]
[INFO] — build-helper-maven-plugin:1.5:add-test-resource (add-clojure-test-source-dirs) @ core.logic —
[INFO]
[INFO] — maven-resources-plugin:2.3:resources (default-resources) @ core.logic —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kima/programming/core.logic/src/main/resources
[INFO] Copying 14 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ core.logic —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — clojure-maven-plugin:1.3.13:compile (clojure-compile) @ core.logic —
Compiling clojure.core.logic.unifier to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.nominal to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.datomic to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.dcg to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.fd to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.pldb to /tmp/classes7718945366616667003.dir
Compiling cljs.core.logic to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.arithmetic to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.protocols to /tmp/classes7718945366616667003.dir
Compiling cljs.core.logic.pldb to /tmp/classes7718945366616667003.dir
Compiling clojure.core.logic.bench to /tmp/classes7718945366616667003.dir
[INFO]
[INFO] — maven-resources-plugin:2.3:testResources (default-testResources) @ core.logic —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kima/programming/core.logic/src/test/resources
[INFO] Copying 3 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ core.logic —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.10:test (default-test) @ core.logic —
[INFO] Surefire report directory: /home/kima/programming/core.logic/target/surefire-reports

------------------------------------------------------- T E S T S
-------------------------------------------------------
Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] — clojure-maven-plugin:1.3.13:test (clojure-test) @ core.logic —

Testing clojure.core.logic.pldb.tests

Testing clojure.core.logic.nominal.tests

Testing clojure.core.logic.tests

Ran 425 tests containing 661 assertions.
0 failures, 0 errors.
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------ [INFO] Total time: 33.466s
[INFO] Finished at: Sun Jul 26 14:03:54 CEST 2015
[INFO] Final Memory: 12M/300M
[INFO] ------------------------------------------------------------------------

~/programming/core.logic $ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout – <file>..." to discard changes in working directory)

modified: src/main/clojure/clojure/core/logic.clj
modified: src/test/clojure/clojure/core/logic/tests.clj

no changes added to commit (use "git add" and/or "git commit -a")

import
August 5, 2015, 3:27 PM

Comment made by: ticking

I didn't see failing tests after applying this patch either.

Assignee

David Nolen

Reporter

import

Labels

Approval

None

Patch

Code and Test

Priority

Trivial
Configure