Major change into libGPR2 and GPRTools, all APIs previously
using Attribute_Id and/or Package_Id/Attribute_Id are now
using the combined qualified name Q_Attribute_Id in order
to unify APIs usage.
Few exceptions exist when retriving Attributes from a named
Package.
As Q_Attribute_Id is now used all over libGPR2, the list of
Attribute_Id constants was removed and a list of Q_Attribute_Id
constants can now be found at the same place. This was done
to simplify APIs call by providing defined and registered
attributes qualified name.
V720-027 :
When users are adding attributes without adding a package first
this package is not taken into account when launching Validity_Check.
We cannot make the assumption on which kind of project this package
is authorized to be in, so we are adding a precondition.
We now raise an ASSERTION_ERROR when trying to add an attribute
in a unknown package.
TN: V725-008
TN: V720-027
Change-Id: I3807ac993002c308021f082c7ba034cc371563cc
no-precommit-check
This patch is rejected by the "Copyright notice must include current
year" check, we actually want to preserve the copyright years here.
TN: V822-021
Change-Id: Iad42ad0863f12d7a3c714855287c5996581910b6
The view's "Attribute" function now fully computes the attributes values
based on the attributes definitions in Project.Registry.Attribute.
The various subprograms that were used to retrieve individually those
values are now simplified and call Attribute.
As a result, retrieval of Package Values and Attributes need to be
performed via the View, so as a result GPR2.Project.Pack is now a private
package, and only contains the raw object definition of a Package.
The parser is also reworked to benefit from the attribute computation when
referencing attributes. As a result it now need to work on the view object
rather than trying to build first the lists of variables and attributes
before building the object.
In order for the parser to see the package definition, it has been also
renamed to GPR2.Project.Parser, and GPR2.Parser hierarchy is now removed.
Finally, the GPR2.Project.Attribute object has been improved to include
missing information to fully handle all situations. In particular the
notion of Aliased attributes is now added to it (attributes that have
different names, such as Spec and Specification).
Part of U813-023
Change-Id: Ife12e67035c45f2915050e6550eb7d83d98fede2
Depends-On: Ie49c13da3ef7dbfc5f9b51f863e46b9f0ff9c4d1
This allows for faster retrieval of attributes with the use of containers
manipulating bounded values, as well as simple integer comparisons.
Depends-On: I325abb397527ac72abff4f3bfe315a3a42aad25b
TN: U722-008
Change-Id: Ic56ecb845fb6768d62b5b6c533850c2f58550469
TB05-027
Split Name_Type usage between identifiers and filenames.
Use Filename_Type for filenames. It is case sensitive or not depend on OS
filesystem case sensitivity.
Add parameter Force_Spec for artifacts creation to fix naming exception
processing.
Change-Id: Ib2cafee6496e0a4782738d7c466edb98c1b59e9b
We were passing the name as an Identifier.Object but storing only
the name as a string hence losing the sloc. Furthermore now Name
does return an Identifier.Object.
Change-Id: I51f8c1e8ee872360bfa40f564d42ddfc5d856933
The Name is a Source_Reference.Identifier.Object and the Value
is a Source_Reference.Value.Object. This is needed to be able
to record the source references for values. The API is now also
cleaner, we were passing the Name (as Name_Type) and the corresponding
sloc to each routine. Now the slock for the Name is into the
corresponding object.
This change also support Name and Value for variables and types.
Adapt the code to this new API.
Change-Id: Ica2bd2ab0f4666c58378d7b8b7748b7b58613269
The semantic is that we look first for a project and then
for a packages.
Add corresponding regression test.
Part of OB10-014.
Change-Id: I37bc6226627dc23255ff0ff54b8cdebdb5eb956e