[eiffel-users] Strange VAPE error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[eiffel-users] Strange VAPE error

Louis M
Hi everyone,

I have a little error here and I have to admit that I feel super noob because my error seems elementary, almost trivial. But the problem is that I don't understand it. Here it is. I have this simple code:


deferred class
    REPOSITORIES_SHARED

feature {NONE} -- Implementation

    database_access:DATABASE_ACCESS
            -- The database session manager
        once
            create Result.make
        end

    users_repository:USER_REPOSITORY
            -- The {REPOSITORY} used to create {USER}
        require
            Is_Set: database_access.is_database_set
        once
            create Result.make (database_access)
        end

end

The compiler give me a "VAPE: some clients have access to routine but not to a feature used in its precondition". The error is with the precondition of `users_repository' and the insufficient exported feature is `database_access'. Both feature are exported {NONE}, so it is not true to say that client that have access to `users_repository' does not have access to `database_access'. I'm sure there is a very good reason for the compiler to give me this error, but I don't know what it is. If somebody can explain it to me, I would be glad.

Thanks,

Louis M

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[eiffel-users] Re: Strange VAPE error

Finnian Reilly
Are you sure that `is_database_set' is sufficiently exported, because descendants of REPOSITORIES_SHARED need to access this value.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [eiffel-users] Strange VAPE error

'Alexander Kogtenkov' via Eiffel Users
In reply to this post by Louis M
Most probably feature `users_repository` is exported in a descendant though `database_access` is not. Also, the complete error message could mention the descendant class name.

Alexander Kogtenkov


 Louis M <[hidden email]>:

Hi everyone,

I have a little error here and I have to admit that I feel super noob because my error seems elementary, almost trivial. But the problem is that I don't understand it. Here it is. I have this simple code:


deferred class
    REPOSITORIES_SHARED

feature {NONE} -- Implementation

    database_access:DATABASE_ACCESS
            -- The database session manager
        once
            create Result.make
        end

    users_repository:USER_REPOSITORY
            -- The {REPOSITORY} used to create {USER}
        require
            Is_Set: database_access.is_database_set
        once
            create Result.make (database_access)
        end

end

The compiler give me a "VAPE: some clients have access to routine but not to a feature used in its precondition". The error is with the precondition of `users_repository' and the insufficient exported feature is `database_access'. Both feature are exported {NONE}, so it is not true to say that client that have access to `users_repository' does not have access to `database_access'. I'm sure there is a very good reason for the compiler to give me this error, but I don't know what it is. If somebody can explain it to me, I would be glad.

Thanks,

Louis M

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [eiffel-users] Strange VAPE error

Louis M
Le lundi 22 mai 2017 13:05:12 UTC-4, Alexander Kogtenkov a écrit :
Most probably feature `users_repository` is exported in a descendant though `database_access` is not. Also, the complete error message could mention the descendant class name.

Alexander Kogtenkov

That was it. I feel bad. In an descendant of {REPOSITORIES_SHARED}, I exported {ANY} the `users_repository. So the error has a lot of sense now. Also you are right; in the complete error, there was a reference to the class that the feature was exported. I will know next time.

Good day,

Louis M

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
Loading...