-
Notifications
You must be signed in to change notification settings - Fork 348
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
Updated test cases #2439
base: master
Are you sure you want to change the base?
Updated test cases #2439
Conversation
22b7d6b
to
46015ff
Compare
@tgingold can you have a look into one of the testcases. It causes a Depending on the environment in CI, the error looks a bit different. My local system (Native Python 3.11 + mcode DLL build with MinGW64) shows this: |
The test is trying to load |
This should fix the crash:
|
While this removes the mistake, how can we make the code more save. Also a user using pyGHDL.dom could make this mistake. Options I see:
Looking at the code, |
Oh I see, Could |
The Python code is here: https://github.com/ghdl/ghdl/blob/master/pyGHDL/dom/NonStandard.py?ts=2#L185-L194 |
You can call Find_Source_File to get the index of a source file.
|
Is this ok, or do I need to setup directory structures as well? If so, how should it be done? |
Yes, it is ok. Directory set to Null_Identifier means local directory.
|
What am I missing?
@BindToLibGHDL("files_map__find_source_file")
def Find_Source_File(Directory: NameId, Name: NameId) -> SourceFileEntry:
"""
Return an existing entry for a filename.
:param Directory: ``Null_Identifier`` for :obj:`DirectoryId` means current directory.
:param Name: File name
:return: Return ``No_Source_File_Entry``, if the file does not exist.
"""
return 0 Is there an export missing in the Ada code? |
You need to make it public: copy the specification to the private part of the .ads file.
|
46015ff
to
12fa6eb
Compare
Ah, sorry, now I see it. Search directed me to the body file adb. With a check, I can now emit this exception in Python:
|
0671eff
to
5e8f9d0
Compare
5e8f9d0
to
483a4bd
Compare
43cb89d
to
bb09f8a
Compare
bb09f8a
to
165bffa
Compare
b748d8a
to
c3eed8c
Compare
c3eed8c
to
7f6744b
Compare
26055ee
to
e8fd2a1
Compare
e8fd2a1
to
daf5597
Compare
(cherry picked from commit 8853d4b3ddd84ed06e33c4902b24e6784915709e)
(cherry picked from commit bd3191d87cb3ae599c41f6e4363d5a3930a34355)
(cherry picked from commit 8fd2965191f3484bdf960e0ef08df6da04c41647)
(cherry picked from commit fdfe104531660a91c6d3b107a14d572b2333d5bc)
(cherry picked from commit b783c9f8834116da368cbcb69667b3b88bca7d1f)
(cherry picked from commit f779b5c59499f8d3b3ba5cad48cb1001bc02e656)
(cherry picked from commit 7616d44a65bc20e504278390f986ada25e6ff2a1)
(cherry picked from commit e7e4844d52d72ba17761858ef2a32be4024724ba)
daf5597
to
f0aef24
Compare
(cherry picked from commit 5b955b635907e97aecae9a4be489d4946de933bf)
New Features
files_map__find_source_file
asfiles_map.Find_Source_File()
.--library <LIB>
to demo application for pyGHDL.dom.--library
.Updates
~=6.1
.TerminalUI
package.Attributes
package.pyAttributes
as it's now part of pyTooling.pyVHDLModel
v0.28.0
Bug Fixes