Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for FIND of a specific module in a block #1708

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 2 comments
Closed

False positive for FIND of a specific module in a block #1708

Siskin-Bot opened this issue Feb 15, 2020 · 2 comments
Labels
CC.resolved Issue with CureCode status built, tested or complete Datatype: module! Test.written Type.bug

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: BrianH

If you attempt to FIND a specific module in a block, it will find the first module in the block, not the specific module you are looking for. This is almost always a false positive. It should return the same module it is looking for (not an "equal" one, the same one).

This currently breaks IMPORT of premade module! values, and DO of modules. I can add a workaround to the source for now.

>> find system/modules module [] []
== [make module! [
        lib-base: handle!
        xtest: make function! [[][
            foreach blk [
                [xarg0]
                [xarg1 111]
                [xarg1 1.1]
                [xarg1 "test"]
                [xarg1 [1 2 3]]
                [xarg1 10-Sep-2010]
                [xarg2 111 222]
                [xword0]
                [xword1 "system"]
                [xobj1 system 'version]
                [calls lib 'negate]
                [calls lib 'sine]
                [...
; Should return none, since a freshly made module! would not be there yet.

Imported from: CureCode [ Version: alpha 107 Type: Bug Platform: All Category: Native Reproduce: Always Fixed-in:alpha 110 ]
Imported from: metaeducation#1708

Comments:

Rebolbot commented on Oct 24, 2010:

Submitted by: BrianH

If this ticket is dismissed (semantics of FIND changing and all that), at least the workaround code works. I'm not pushing for this either way.


Rebolbot commented on Oct 26, 2010:

Submitted by: BrianH

See #1720 for an alternative suggestion.


Rebolbot commented on Oct 26, 2010:

Submitted by: Carl

That's bizarre. Trying some tests on it. For now, assume it is fixed and don't work around it.


Rebolbot commented on Oct 27, 2010:

Submitted by: BrianH

Note: It doesn't even test equivalence - any module will do. I will comment out the workaround code when FIND is verified to work (wrote it already days ago).


Rebolbot mentioned this issue on Jan 12, 2016:
FIND /same option


Rebolbot added the Type.bug on Jan 12, 2016


@Siskin-Bot Siskin-Bot added the CC.resolved Issue with CureCode status built, tested or complete label May 22, 2020
@Oldes Oldes closed this as completed Oct 2, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Oct 7, 2020
@Oldes
Copy link
Owner

Oldes commented Nov 25, 2020

It's there again.. probably with the find/same change.

@Oldes Oldes reopened this Nov 25, 2020
@Oldes
Copy link
Owner

Oldes commented Nov 25, 2020

Ech... false alarm... there was just empty module in my tests already.

@Oldes Oldes closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CC.resolved Issue with CureCode status built, tested or complete Datatype: module! Test.written Type.bug
Projects
None yet
Development

No branches or pull requests

2 participants