Merge ~info-martin-konrad/epics-base:deprecation-warning-state-record into ~epics-core/epics-base/+git/epics-base:7.0

Proposed by Martin Konrad
Status: Merged
Approved by: Andrew Johnson
Approved revision: 94728eda0d62a777bd30417d0a728be896b6649a
Merge reported by: mdavidsaver
Merged at revision: 94728eda0d62a777bd30417d0a728be896b6649a
Proposed branch: ~info-martin-konrad/epics-base:deprecation-warning-state-record
Merge into: ~epics-core/epics-base/+git/epics-base:7.0
Diff against target: 58 lines (+21/-1)
2 files modified
documentation/RELEASE_NOTES.md (+6/-0)
modules/database/src/std/rec/stateRecord.c (+15/-1)
Reviewer Review Type Date Requested Status
Andrew Johnson Approve
Review via email: mp+379159@code.launchpad.net

This proposal supersedes a proposal from 2020-01-31.

Description of the change

Rebased on 7.0.

To post a comment you must log in.
Revision history for this message
Andrew Johnson (anj) wrote : Posted in a previous version of this proposal

I would prefer that this go into the 7.0 branch; we aren't going to remove the state record from any 3.15 release and probably not from a 7.0 release, but I could see it going from 7.1. In any case it will need an entry in the Release Notes too.

Revision history for this message
Martin Konrad (info-martin-konrad) wrote : Posted in a previous version of this proposal

I have updated the message to say the record will be removed in 7.1 - these details might save users some research.

Note that according to https://github.com/epics-base/epics-base/blob/3.15/src/std/rec/stateRecord.dbd.pod this record is deprecated even in 3.15. As a 3.15 user I would appreciate a warning like this - rather than silently running into surprises after upgrading to 7.1. Let me know if you still prefer to merge this into the 7.0 branch.

Revision history for this message
Andrew Johnson (anj) wrote : Posted in a previous version of this proposal

That doc warning was only added at the Documentathon (last September, so not really "for a while") when we de-wikified the record reference docs, and it was more to scare people away from using the event record type in new databases than to actually flag that it was about to be deleted. I wouldn't have actually removed it until after lots of warning in the release notes. The disadvantage with putting this in 3.15 and the 3.15 release notes is that when they get merged up to 7.0 the release entries about 3.15 changes appear somewhere towards the middle of the release document, not at the top, so it will actually be less visible than if you were to make the change directly on the 7.0 branch.

Revision history for this message
Martin Konrad (info-martin-konrad) wrote :

I improved the formatting of the message as discussed during our code review earlier today.

Revision history for this message
Andrew Johnson (anj) wrote :

Group Review 2020-03-25: Approve.

review: Approve
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Cherry picked as fd5edce919ba5a24469faf28d3453086a3ac4df1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md
index 2adeacf..4bd4297 100644
--- a/documentation/RELEASE_NOTES.md
+++ b/documentation/RELEASE_NOTES.md
@@ -12,6 +12,12 @@ The external PVA submodules each have their own separate set of release notes
12which should also be read to understand what has changed since an earlier12which should also be read to understand what has changed since an earlier
13release.13release.
1414
15### `state` record deprecated
16
17IOCs now emit a warning when a database file containing the `state` record is
18loaded. This record has been deprecated for a while and will be removed
19beginning with EPICS 7.1. Consider using the `stringin` record instead.
20
15## EPICS Release 7.0.3.121## EPICS Release 7.0.3.1
1622
17**IMPORTANT NOTE:** *Some record types in this release will not be compatible23**IMPORTANT NOTE:** *Some record types in this release will not be compatible
diff --git a/modules/database/src/std/rec/stateRecord.c b/modules/database/src/std/rec/stateRecord.c
index fd5b9fb..78eee99 100644
--- a/modules/database/src/std/rec/stateRecord.c
+++ b/modules/database/src/std/rec/stateRecord.c
@@ -28,6 +28,7 @@
28#include "errMdef.h"28#include "errMdef.h"
29#include "recSup.h"29#include "recSup.h"
30#include "recGbl.h"30#include "recGbl.h"
31#include "errlog.h"
3132
32#define GEN_SIZE_OFFSET33#define GEN_SIZE_OFFSET
33#include "stateRecord.h"34#include "stateRecord.h"
@@ -37,7 +38,7 @@
37/* Create RSET - Record Support Entry Table*/38/* Create RSET - Record Support Entry Table*/
38#define report NULL39#define report NULL
39#define initialize NULL40#define initialize NULL
40#define init_record NULL41static long init_record(struct dbCommon *prec, int pass);
41static long process(struct dbCommon *);42static long process(struct dbCommon *);
42#define special NULL43#define special NULL
43#define get_value NULL44#define get_value NULL
@@ -77,6 +78,19 @@ epicsExportAddress(rset,stateRSET);
7778
78static void monitor(stateRecord *);79static void monitor(stateRecord *);
7980
8081
82static long init_record(struct dbCommon *prec, int pass)
83{
84 if(pass == 0) {
85 errlogPrintf(
86 "WARNING: Using deprecated record type \"state\" for record "
87 "\"%s\".\nThis record type will be removed beginning with EPICS "
88 "7.1. Please replace it\nby a stringin record.\n",
89 prec->name
90 );
91 }
92 return 0;
93}
94
81static long process(struct dbCommon *pcommon)95static long process(struct dbCommon *pcommon)
82{96{
83 struct stateRecord *prec = (struct stateRecord *)pcommon;97 struct stateRecord *prec = (struct stateRecord *)pcommon;

Subscribers

People subscribed via source and target branches